This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
This is with reference to the book - Oreilly's Enterprise JavaBeans 4th Edition, ISBN 0-596-00530-X
I am trying to run the Entity Bean of Chapter 4 in JBoss 4.0+ and mySQL. I have followed all the instructions given in the book.
However instead of titandb-ds.xml I have mysql-ds.xml file. I have also created and copied the file jbosscmp-jdbc.xml to the folder src\resources\META-INF This file has <datasource>java:/DefaultDS</datasource>
What changes do I need to do to the file Client_1.java, especially to the statement Object ref = jndiContext.lookup("CabinHomeRemote");
Are there any other changes, to make my client program work?
So how do you get your Context? Can you see your DataSource in JNDI with the jmx-console? Are there any errors in your server.log when the DataSource was created. [ September 19, 2005: Message edited by: Paul Sturrock ]
So can you now successfully lookup your entity bean? If this is the case, look at your entity bean mapping. Double-check the table-name you have mapped this bean to. It will never insert into a "cabin" table as it is currently defined.