Hi all!

I have a problem with javax.transaction.UserTransaction and I see
no solution so far.

The problem only arises, iff I run my application as Applet in a
Browser (IE or NS, dosn't matter).

I can not get an Instance of UserTranscation, neither with a narrow()
(this returns an Instance of javax.naming.Reference) nor
with NamingManager.getObjectInstance() (returns also a Reference)

If I run the Application as Java Application (not as Applet) 
I do not have this Problems, I just can use
PortableRemoteObject.narrow()
to get an Instance of UserTransaction.

One more thing, we use HTTP tunneling if we run the Applet.

For details, please se the following code

Thanks, Max

----------------- CODE -------------------

protected AbstractImportController(Context aInitialContext) 
        throws NamingException, RemoteException, CreateException,
Exception {

    home = (DataImportHome) PortableRemoteObject.narrow(
            initialContext.lookup("DataImportHome"),
DataImportHome.class);
    // home is OK

    Object obj = null;
    try {
        obj = PortableRemoteObject.narrow(
            initialContext.lookup("javax.transaction.UserTransaction"), 
            javax.transaction.UserTransaction.class);
    }
    catch (Exception exc) {
        exc.printStackTrace();
    }

    if (obj instanceof javax.naming.Reference) {
        // obj is: javax.naming.Reference 
        Object o = NamingManager.getObjectInstance(obj, null,
aInitialContext, null);
        // this fails, o is again of type javax.naming.Reference
        utx = (UserTransaction)  o;
    }
}
----
This list is cross-posted to two mail lists.  To unsubscribe,
follow the instructions below for the list you subscribed to.
For objectweb.org: send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe ejb-container-group".
For enhydra.org: send email to [EMAIL PROTECTED] and include
in the body of the message "unsubscribe ejb-container-group".

Reply via email to