This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I am having a bit of trouble understanding BMP entity beans. For an assignment at university I have to re-write an MVC architecture application to an n-tier application using session beans and entity beans. I am making slow progress, but was sort of stopped dead by SAMS 'Teach yourself J2EE in 21 days' explanation of how to implement BMP entity beans. I am attempting to keep the front end of my application, because I rather like it. In order to keep it, though, I need to write (I think) a BMP that represents an 'order line' (one line on the order; order number, product number, product name, description etc etc etc). This data is found in two tables in my database, namely the orderline and product tables. My 'orderline' BMP should write some of the data it contains (order number, product number, line quantity, line total) to the orderline table when the create() method is called. However, when I wish to obtain orderline references by calling a findByOrderNo() method, the BMP must get data from the product table also. I just don't understand the J2EE book I have, at all. If someone has time to try and explain this in simple terms I'd be so very grateful. Alternatively, links to good articles are joyfully accepted. Why must it be so complex? Sincerely, Oyvind