Results 1 to 2 of 2
  1. #1
    parimal is offline Member
    Join Date
    Jul 2008
    Posts
    12
    Rep Power
    0

    Lightbulb UREGENT-accessing session bean ok but entity bean

    Hi all,
    Please help me out from this problem,its urgent....
    I am able to access session bean but can't access Entity bean
    where I used the same thing to look up beam.
    Can u tell me please there is any difference between session bean and entity bean.....(TestSession,MbLogin3) to look up.
    I am using OC4J J2EE container
    I am also sending the the followings so that u can check if there is any mistake in Deployment descriptor:

    ejb-jar.XML
    ----------------------------------------

    <ejb-jar>
    <enterprise-beans>
    <session>
    <description>Session Bean ( Stateless )</description>
    <display-name>TestSession</display-name>
    <ejb-name>TestSession</ejb-name>
    <home>com.tcs.ibs.model.TestSessionHome</home>
    <remote>com.tcs.ibs.model.TestSession</remote>
    <ejb-class>com.tcs.ibs.model.TestSessionBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    <entity>
    <description>Entity Bean ( CMP )</description>
    <display-name>MbLogin3</display-name>
    <ejb-name>MbLogin3</ejb-name>
    <home>com.tcs.ibs.model.MbLogin3Home</home>
    <remote>com.tcs.ibs.model.MbLogin3</remote>
    <local-home>com.tcs.ibs.model.MbLogin3LocalHome</local-home>
    <local>com.tcs.ibs.model.MbLogin3Local</local>
    <ejb-class>com.tcs.ibs.model.MbLogin3Bean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.String</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>MbLogin3</abstract-schema-name>
    <cmp-field>
    <field-name>userId</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>terminalIp</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>loginDate</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>locBranchCd</field-name>
    </cmp-field>
    <query>
    <query-method>
    <method-name>findAll</method-name>
    <method-params/>
    </query-method>
    <ejb-ql>select object(o) from MbLogin3 o</ejb-ql>
    </query>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>TestSession</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>MbLogin3</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Supports</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    </ejb-jar>



    orion-ejb-jar.XML
    -----------------------------------------------


    <orion-ejb-jar>
    <enterprise-beans>
    <!--<persistence-manager name="toplink"/>-->
    <session-deployment name="TestSession"/>
    <entity-deployment name="MbLogin3" data-source="jdbc/DBConnectionDS" table="MBBCLS.MB_LOGIN" copy-by-value="true" exclusive-write-access="false" pm-name="native_cmp">
    <primkey-mapping>
    <cmp-field-mapping>
    <fields>
    <cmp-field-mapping name="userId" persistence-name="USER_ID" persistence-type="VARCHAR2(30)"/>
    <cmp-field-mapping name="terminalIp" persistence-name="TERMINAL_IP" persistence-type="VARCHAR2(20)"/>
    <cmp-field-mapping name="loginDate" persistence-name="LOGIN_DATE" persistence-type="DATE"/>
    <cmp-field-mapping name="locBranchCd" persistence-name="LOC_BRANCH_CD" persistence-type="VARCHAR2(9)"/>
    </fields>
    </cmp-field-mapping>
    </primkey-mapping>
    <cmp-field-mapping name="userId" persistence-name="USER_ID" persistence-type="VARCHAR2(30)"/>
    <cmp-field-mapping name="terminalIp" persistence-name="TERMINAL_IP" persistence-type="VARCHAR2(20)"/>
    <cmp-field-mapping name="loginDate" persistence-name="LOGIN_DATE" persistence-type="DATE"/>
    <cmp-field-mapping name="locBranchCd" persistence-name="LOC_BRANCH_CD" persistence-type="VARCHAR2(9)"/>
    </entity-deployment>
    </enterprise-beans>
    </orion-ejb-jar>
    Parimal
    java heart

  2. #2
    parimal is offline Member
    Join Date
    Jul 2008
    Posts
    12
    Rep Power
    0

Similar Threads

  1. Error deploying Entity Bean
    By RobertoWIN_MX in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 05-01-2008, 05:17 AM
  2. Sample Entity Bean
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-28-2007, 10:41 AM
  3. Home interface for entity bean
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-28-2007, 10:41 AM
  4. Remote interface for entity bean
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-28-2007, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •