• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

weblogic-ejb-jar.xml prblems ....

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at the WL examples and at: http://e-docs.bea.com/wls/docs61/ejb/reference.html#1048022
Taked from the wl 6.1 ejb2.0 examples:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
"-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
"http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >

<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>containerManaged</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>ejb20-containerManaged-AccountHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
 
Let's get him boys! We'll make him read this tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic