Lately, investors have taken a "glass half-full" outlook on enterprise software companies, especially in light of recent merger-and-acquisition (M&A) activity. It also helps that companies continue to generate strong cash flows, as is the case with BEA (NASDAQ:BEAS). On the news of its second-quarter earnings report, the stock rose almost 6%, and if investors continue to move money in the sector, BEA is likely to keep making shareholders happy.

The company's revenues increased 19% to $339.6 million. Excluding non-cash expenses, such as employee stock option expenses, it earned $56.1 million, or $0.14 per share, up from $37.7 million or $0.09 per share in the same period a year ago.

BEA builds sophisticated software known as middleware, which allows companies to run Web applications like e-commerce sites. Another key product is portal software; this helps employees collaborate on projects and search content.

It is encouraging that the business posted 15% growth in license revenue (to $136 million) and closed 17 deals in excess of $1 million (up from 10 in the same period a year ago). In other words, management is finding success in selling a bundle of products to customers.

This is magic for cash flow. In the second quarter, cash flow from operations totaled $50 million, up from $9 million a year ago. The company now has about $1.4 billion in the bank. Moreover, management expects the momentum to continue, forecasting revenue in the range of $341 million to $355 million.

True, there are risk factors. First, BEA's audit committee is conducting a preliminary investigation of its option practices. No doubt, this is a big issue for many tech companies -- as seen in several recent criminal charges.

Second, the core market for application servers is fairly mature, growing in the low single digits. Besides, there is growing competition from low-cost solutions, such as RedHat's (NASDAQ:RHAT) JBoss. But as Fool colleague Anders Bylund points out, BEA's core application server product is rock-solid and has an impressive record over the years.

But Wall Street seems to be overlooking the risks. Why? Well, investors are encouraged by a string of major deals, including IBM's (NYSE:IBM) $1.6 billion purchase of FileNet (NASDAQ:FILE) and its $740 million purchase of MRO Software (NASDAQ:MROI). There are also big deals from Hewlett-Packard (NYSE:HPQ), like its $4.5 billion purchase of Mercury Interactive and its $425 million purchase of Peregrine. In fact, a key growth driver for HP's blowout second quarter came from its investment in the software space.

As a result, money is flowing into the sector as investors look to benefit from the consolidation. And for the most part, BEA is a reliable business that would be a good fit for a larger company, such as IBM, HP, or Oracle (NASDAQ:ORCL). BEA has a defensible product line, significant customer base, and hefty cash flows.

The problem is that the growth rate of the sector is still fairly moribund and it is nearly impossible to predict the next buyout. Fools, beware -- this is a game for the speculators.

For further Foolishness:

What type of investor are you? Take a free trial to any of our newsletters to find out.

Fool contributor Tom Taulli does not own shares of any company mentioned in this article.