Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

where should I put ejb-jar.xml

 
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
Marshal
Posts: 34839
369
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic