java - EJB 3.1 application deployed as WAR-only: What about ejb-jar.xml? -


i have javaee6 application, consisting of web stuff , ejbs , deployed war-only (using ejb3.1). build based on maven. read new possibility order module initialization in java ee 6 here need application. also, have option define ejb properties in xml.

since example deployed ear-project order defined in application.xml. in war-deployed project, there no application.xml. wonder can define such informations? or possible use application.xml somehow in war-deployed-app?

edit:

oops didn't read module-order-example right, in first moment thought in order ejbs in app loaded. of course have 1 module in war-app, ordering makes no sense.

ok, i'm @ it, 1 big question remains (also altered question title reflect change): ejb-jar.xml? can somehow define stuff ejbs in xml (as useful settings, avoid recompilation)?

in short, not possible war based deployment.

the module initialization feature of java ee 6 meant initializing different modules of application in specific order. moment have war based ejb application, no longer have separate modules ejb , web application. there 1 module - web application module in war based deployment.

therefore, if have achieve same feature module initialization order, offered in java ee 6, you'll have either of following:

  • separate ejb separate module, , use ear based deployment.
  • this more or less trickery, done in java ee 5, , want avoiding it. might want code in logic ensure singleton ejbs have been created (assuming due use of singletons in application), before they're utilized in code.

location of ejb-jar.xml in war file

the ejb 3.1 specification (in chapter on packaging) addresses issue of location of ejb-jar.xml file when deployed in war:

in .war file, deployment descriptor stored name web-inf/ejb-jar.xml.

ps: haven't tried style of deployment yet. ymmv.


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -