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.
So you are trying to create a datasource to be used in your application. You don't have to change the existing default datasource. All you have to do is create a file named *-ds.xml and place it in the deploy folder of JBoss. The contents of the -ds.xml are explained here
Joined: Apr 01, 2007
Thanks for the response!
I�m currently doing an EJB 3.0 app and I would like to use MySQL 5.x instead of the default HSQL of JBoss.
Some of the issues that I am having difficulties would be the ff:
1) right or best (production grade) set-up for JBoss AS 5 & MySQL 5.x. 2) using JPA and EJB 3.0.
I� am having some problems/errors when testing the deployed jar, particularly in the InitialContext part.
3) the right configurations in my file, like in my persistence.xml, and others.
I am not sure if there are some easy way of steps in doing these stuff. I�ve searched some articles but it seems I am still lost.
I�ve really appreciate some help with these. Thanks in advance!
Originally posted by Daniel Jabonete: I�m currently doing an EJB 3.0 app and I would like to use MySQL 5.x instead of the default HSQL of JBoss.
Originally posted by Daniel Jabonete: 1) right or best (production grade) set-up for JBoss AS 5 & MySQL 5.x.
You can use JBoss-5.0 GA and any latest stable version of MySQL database server and driver. Follow Peter's advice here. All you have to do is create a -ds.xml file and drop it in the deploy folder of JBoss. You can find a sample mysql-ds.xml in %JBOSS_HOME%/docs/examples/jca folder. Also, drop the MySQL JDBC jar file in %JBOSS_HOME%/server/default/lib folder.
Originally posted by Daniel Jabonete: 2) using JPA and EJB 3.0.
Is this the first time, you are trying to use EJB3 and JPA? Just trying to understand whether you are having any JBoss specific issues or any generic EJB3 issues
Originally posted by Daniel Jabonete: I� am having some problems/errors when testing the deployed jar, particularly in the InitialContext part.
Please post more details including stacktrace and relevant code. We will be glad to help.
Originally posted by Daniel Jabonete: 3) the right configurations in my file, like in my persistence.xml, and others.
Does this help? [ January 03, 2009: Message edited by: Jaikiran Pai ]
Joined: Apr 01, 2007
I've read the EJB 3.0 from O'Reilly and successfully run the sample source codes included in there using JBoss
And now I've this new and would like to try it out using JBoss AS 5 & MySQL 5.
I've successfully compiled & deployed my *.jar file in JBoss 5:
I'm having some problem testing it. This is my standalone client class for testing:
and this is my persistence.xml below:
when I tried to run the client class for testing, it returns some stackTrace error:
I am trying to have a separate project in eclipse 3.2 for testing the deployed Entities & Session Beans.
Thanks in advance for your help, really appreciate it!
Daniel Jabonete wrote:
Now, I would like to test this in a web app. Any advice for doing this...
You can create a WAR containing the web application and then create an EAR with this WAR and the EJB jar. The bean lookup code will remain the same, but will be moved out from the standalone client to some servlet (just an example), in the web application.