Bugs item #463590, was opened at 2001-09-21 08:50
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=463590&group_id=22866

Category: None
Group: v2.4 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Entity bean reference is lost

Initial Comment:
I'm using a stateful session bean to lookup home interfaces for different entity 
beans, instantiate 
them and return the remote references to the client. This code worked properly with 
JBoss 2.2X 
but fails with 2.4.1.

Excerpt from sample session bean code:
public CustomerRemote getCustomer( Integer customerPK ) throws RemoteException {
    try {
        CustomerHome home = (CustomerHome) jndi.lookup( "java:comp/env/ejb/Customer" );

        return clHome.create( customerPK );
    }
    catch(Exception e) {
        e.printStackTrace();
        throw new RemoteException(e.getMessage());
    }
}

When client calls getCustomer() on the stateful session bean, a new Customer i created 
and the 
remote customer is returned. Now, when the client makes a call to this newly created 
Customer 
bean (entity), yet another instance is created, without all the inital data such as 
the primary key.
No exceptions thrown, but contents of Customer is of course invalid.

This is part of my ejb-jar.xml:
    <session>
        <ejb-name>Session</ejb-name>
            <home>com.posten.ejb.SessionHome</home>
            <remote>com.posten.ejb.SessionRemote</remote>
            <ejb-class>com.posten.ejb.Session</ejb-class>
            <session-type>Stateful</session-type>
            <transaction-type>Bean</transaction-type>
            <ejb-ref>
                <ejb-ref-name>ejb/Customer</ejb-ref-name>
                <ejb-ref-type>Entity</ejb-ref-type>
                <home>com.posten.ejb.CustomerHome</home>
                <remote>com.posten.ejb.CustomerRemote</remote>
                <ejb-link>Customer</ejb-link>
            </ejb-ref>
    </session>

I'm using Sun JDK 1.3 on a Win NT 4.0 workstation with Oracle Thin Driver 8.1.6.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=463590&group_id=22866

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to