• Post Reply Bookmark Topic Watch Topic
  • New Topic

generally, where is database and ejb server info stored in ear?

 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello. In resin, I found I have to put the jndi tags, etc for the ejb server and database in the server configuration file (resin.conf) for the ear to deploy properly. I know I had it in web.xml when I tested deploying ejbs in a war...but I can't figure out where it should go with an ear and have it read by the container. The server config file doesn't seem to feel right to me since it diminishes portability. This stuff doesn't go into the war inside the ear, does it? I was thinking some server specific file, like resin-web.xml or jboss-web.xml that is stored in Meta-inf along with application.xml, but I haven't had any luck getting that read. Am I on the right track with that approach/attempt? Anyways, I really appreciate you reading this and thank you for any input.
[ May 02, 2005: Message edited by: Tom Griffith ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35719
412
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tom,
The JNDI tags usually go in the ejb-jar.xml deployment descriptor, which is portable. It is part of the J2EE spec.

The database/datasource configuration does in fact go in the server config file. It is something you would create on each server you are using. This is not portable as it is not part of the ear. However, it still is fairly portable. You reference the datasource using a JNDI name, so the code/ear doesn't have to change if the database or app server change.
 
Tom Griffith
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne. Thank you very much. Ok, now I realize the jndi name for each ejb goes into resin-web.xml (actually resin also has *.ejb which is the same and I have to admit they are kinda easy to use, although not in line with other servers)...and the database stuff goes in on the server level in the config document. With that, resin has a tag <ejb-server> which configures the server for ejb and sets the datasource for ejb...I'm starting to mess with jboss but I assume this is also specified at the server level (config file) since the database stuff it references is in the config file. I think I have this straight...thank you very much again.
[ May 02, 2005: Message edited by: Tom Griffith ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!