Discussions

EJB programming & troubleshooting: Exception came when change stateful to stateless in ejb-jar.xml

  1. Hi,
    I am getting exception when i change the below entry from Stateful to Stateless for Transaction Type "Container"..

    ----------------------------------------------------------------Working Fine for single and multi users----------------------------------------------------
    <session>
    <description>Entity Bean Employee Example</description>
    <ejb-name>Stlg</ejb-name>
    <local-home>com..ejb.session.ejbeans.StlgHome</local-home>
    <local>com.ejb.session.ejbeans.Stlg</local>
    <ejb-class>com.ejb.session.ejbeans.StlgBean</ejb-class>
    <session-type>Stateful</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    ----------------------------------------------------------------Working Fine for single and multi users----------------------------------------------------

     

     


    ----------------------------------------------------------------Working Fine for single user and exception for multi users----------------------------------------------------
    <session>
    <description>Entity Bean Employee Example</description>
    <ejb-name>Stlg</ejb-name>
    <local-home>com..ejb.session.ejbeans.StlgHome</local-home>
    <local>com.ejb.session.ejbeans.Stlg</local>
    <ejb-class>com.ejb.session.ejbeans.StlgBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    ----------------------------------------------------------------Working Fine for single and exception for multi users------------------------------------------------------------

    2012-06-27 12:27:15,531 DEBUG com.ds.ApplSessListener 16 - vattributeAdded : errorencountered,java.lang.ClassCastException: java.lang.String cannot be cast to com.packg.class

    Strange that its working for single user and cracking for multiuser when tested via jmeter and that too cracking in case of 'Stateless' only

     

     

     

     

     

    Threaded Messages (1)

  2. Good topic[ Go to top ]

    Good topic. But, I was having a hard time figuring this thing out. I guess, I still need more information on this. - JustFab