• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple beans in a Deployment Descriptor  RSS feed

 
Sagar Sharma
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When do i need to have multiple beans in a single Deployment Descriptor. (i.e. packaged in a single JAR file). I have always used a single jar file for each bean?

Thanks in advance

sagar
 
Ben Roy
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think you ever 'need' to have multiple beans in a single jar file. It's merely an organizational grouping.
 
Sagar Sharma
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I have read that this is possible....can anyone tell me that in which type of applications do i need this type of deployment descriptor??
cheers

sagar
 
Ben Roy
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is possible. I currently have a jar deployed at a customer which contains both session and entity beans. All of them are in the same jar, and they share a single deployment descriptor (actually 2 descriptors, ejb-jar.xml and the server specific one). What I was saying is that I don't think you ever 'need' to set it up this way. It should always be ok to have 8 separate jars, 2 jars with 4 beans each, 4 jars with 2 beans, or just 1 jar with 8 beans. Any way you want to package it should work just fine. Personally I use the single jar because it's a lot more convenient for the client when it comes to deploying.
 
Sagar Sharma
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Thanks Ben for all this.

sagar
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!