• Post Reply Bookmark Topic Watch Topic
  • New Topic

where should I put ejb-jar.xml  RSS feed

 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi. I cannot find out where to place ejb-jar.xml file. I want to use it to inject some resource (String, int), but my application then won't to deploy.
I put ejb-jar.xml file into top level of my-ejb.jar file:

my-ejb.jar
|
|
|-----ejb-jar.xml
|------com.test.SomeBeans



I was try to inject resource like this in MDB :

and this ejb-jar.xml:


or if I try this way in stateless bean:

and ejb-jar.xml :


or if I put ejb-jar.xml file into META-INF/ejb-jar.xml, I get the same result. The EAR application, won't deploy!
So what and where I should put???
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36446
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's supposed to go in META-INF/ejb-jar.xml. Is that your full ejb-jar.xml? It's supposed to have a line on top of that which declares the schema.
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jeanne, my mistake (I was pretty much exhausted) and oversight two ejb element in my DD. it is works now. Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!