jQuery in Action, 2nd edition
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes Third party place for EJB. Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Reply Bookmark "Third party place for EJB." Watch "Third party place for EJB." New topic
Author

Third party place for EJB.

Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
As a web application has lib folder within WEB-INF folder to put the third party jars.But I do not see anything in the jar file structure to store third party jars that I might have used in my bean class.

Do I have to put my third party jars in the context of the classloader of the application server ?

EJB does not have any specific classloader for different jars , like webappclassloader in case of a web application?


Rahul Bhattacharjee
LinkedIn - Blog
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Can someone help me with the answer to this question. I have exam next week and even not gone through the specification yet.Please help me save some time to give a few mock exams.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35253
    
    7
Isn't that what .ear files are for? The difference being that .war files have a correspondingly defined exploded directory structure, while .ear files have not. Which means the EJB container would be free to use them as it sees fit.


Android appsImageJ pluginsJava web charts
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Thanks Ulf , I wasn't aware of the ear packaging.

Does this mean that if my session bean class is dependent on a third party jar ,then there is no means by which I can only deploy the bean jar in application server.
In this case I have to make an ear with the EJB component jar and the third party jar within it and deploy it in the application server.
[ April 24, 2007: Message edited by: Rahul Bhattacharjee ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35253
    
    7
The EJB container may have some kind of 'common' or 'shared' directory for jar files that are being made available to all applications, similar to the way Tomcat does it. I'd have a look at the container you're using for your experiments to see if that is the case.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2300
Thanks Ulf for your response .
I got what I wanted.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Third party place for EJB.
 
Similar Threads
best way of common application jar (xxx.jar,spring.jar,etc...)using path in websphere 7
Classloader Order: JARs in Lib or CLASSPATH?
class loading issue in Jboss
NoClassDefFoundError
Error in defining filter in web.xml