• 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

Deployment descriptor help

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I currently have a EJB jar file with a deployment descriptor ejb-jar.xml (with session and MDB beans defined in it).

However, this EJB jar file contains no classes. The beans defined in ejb-jar.xml are contained in another EJB jar file. Both of these jar files will be packaged together in the same Ear and deployed later.

Will this set up work?

Thanks!
 
Ranch Hand
Posts: 110
Google Web Toolkit Java Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can trick the classloader by naming the modules (or ordering the modules in the application.xml. I'm not sure if it will work) to load the ejb jar with the classes first. Why don't you declare the jar file with the EJB's as an lib folder?
 
Mike Leifaodiwwd
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, to make myself clear, let me name the EJB jar files:
- One with no classes but just the deployment descriptor noclass_ejb.jar
- One with all EJB classes normal_ejb.jar

Now, for certain reasons, I can't change normal_ejb.jar (or else I would merge noclass_ejb.jar's ejb-jar.xml into normal_ejb.jar).

So I deployed both noclass_ejb.jar and normal_ejb.jar in the same application:

Application.ear
-META-INF
-noclass_ejb.jar
-normal_ejb.jar

I also put the normal_ejb.jar as a classpath in noclass_ejb.jar's Manifest.mf.

This setup should still work, right? Since the ejb-jar.xml in noclass_ejb.jar is referencing EJB on its classpath.

I wouldn't want to include normal_ejb.jar as a library for noclass_ejb.jar because it contains other unused classes.
 
Jayr Motta
Ranch Hand
Posts: 110
Google Web Toolkit Java Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you got what I meant, there is a mechanism to declare libraries in an application.xml in an ear file. I'm not saying to make on jar library of the other, but to make one a library of your ear file while the other will be declared as an EJB module.
 
Mike Leifaodiwwd
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I would need to include that in application.xml in the ear file for this to work??
 
Jayr Motta
Ranch Hand
Posts: 110
Google Web Toolkit Java Google App Engine
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this out: http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch01s04s02.html
 
Why fit in when you were born to stand out? - Seuss. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic