Hi there,
I am constructing a small application which needs 3 Entity beans and a session bean ( the session bean calls the entity beans ).
I have deployed the Entity beans individually , and can access them thru a client (
java client) .
In my Session Bean I call the Entity beans in the following manner
Object ref = environment.lookup("java:comp/env/ejb/VispohdrHome"); hdrHome = (VispohdrHome)PortableRemoteObject.narrow(ref,VispohdrHome.class);
this implies that in my ejb-jar.xml I have to inclued the following reference information ..............
<ejb-ref>
<ejb-ref-name>ejb/VispocolorHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>vism.masters.vispocolor.VispocolorHome</home>
<remote>vism.masters.vispocolor.Vispocolor</remote> </ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/VispohdrHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>vism.masters.vispohdr.VispohdrHome</home>
<remote>vism.masters.vispohdr.Vispohdr</remote>
</ejb-ref>
<ejb-ref>
<ejb-ref-name>ejb/VispoetaHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>vism.masters.vispoeta.VispoetaHome</home>
<remote>vism.masters.vispoeta.Vispoeta</remote>
</ejb-ref>
Now when i go to deploy my session bean , I get an error message saying that the
EJB's mentioned in the <ejb-ref></ejb-ref> should be defined in the weblogic-ejb-jar.xml .
My question's Are
1) How do I inclued this information in the weblogic-ejb-jar.xml ( keep in mind that the Entity beans that the Session bean will access has already been deployed )?
2) Is There a better way to package the components ?
Thanking in advance
(Aanupam K)