• Post Reply Bookmark Topic Watch Topic
  • New Topic

Deployment descriptor help

 
Mike Leifaodiwwd
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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!
 
Jayr Motta
Ranch Hand
Posts: 110
Google App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
  • 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 App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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
  • 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 App Engine Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this out: http://docs.jboss.org/jbossas/docs/Server_Configuration_Guide/4/html/ch01s04s02.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!