• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Resource Reference

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic