on 06-20-2007 6:58 PM
I am trying to add a session bean to a j2ee library project. I can successfully add the
jar file containing the bean to the j2ee library and deploy the resulting sda file. The bean however does not appear in the JNDI registry.
If I add the bean to an enterprise application project (EAR) and deploy the ear file,the bean is successfully registered in the JNDI registry.
My question is whether it is at all possible to have a bean in a j2ee library?
Thanks
Thanks Maksim
I thought as much.
The scenario goes like this.
I have a common application with a session bean that handles MQ requests. This is called from other beans. If I reference the common application from these beans the jar file for the common app is included in the EAR file for every bean. The common app jar file is then deployed with each bean.
Is this a normal thing or how would I make it cleaner?
Rod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rodney,
ejb`s are deployed, ..not added..so the answer would be yes and no, yes it is possible to have a bean in a j2ee library, however it should be deployed and thus added..not added.
That is the reason for it not appearing in the jndi registry, check the deployment descriptor for the bean..for more details..
Regards
Ravi Raman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rodney, it is not correct to place EJB`s in library. EJB requires special deployment descriptor for appropriate container and library doesnt` have it. What is the reason which forced you to use library instead of EAR for EJB packaging?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.