• Post Reply Bookmark Topic Watch Topic
  • New Topic

Resource Reference  RSS feed

 
biraji gafiff
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone, i�m newbie on ejb development and i�ve made a conection between my ejb and a data base like this:

That�s all, it�s working fine, so when i have to use ejb-jar.xml and, in my case, jboss.xml to especify my data base conection? Or i did wrong?!
Thanks.

P.S.: Sorry my poor english.
 
Nadeem Awad
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear bir,
I suggest that you read a J2EE tutorial so you can get started. You can try Sun's J2EE 1.4 Tutorial:
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Chapter 23: Enterprise Beans

Regards,
 
Balamaci Serban
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well the name of the database is hard coded in the souce code. Supose you would want to change the database name, or you will have do deploy on another server that the admin has assigned you a database that begins with the username and so it's of different name. In that case you would have to recompile the bean class. Theoretically by puting the name in the ejb-jar.xml you would not have to recompile, as the class would use whatever name is supplied in there.
Not necesarely much improvement since the .xml file is packed inside the .jar file and so it need a repacking anyway. Could be faster just to modify any occurence and recompile the whole thing. But to take care of that posibility you can use the .xml to define the database name.
[ July 17, 2005: Message edited by: Balamaci Serban ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!