Hello Robert,

In the current J2EE specification, support for transaction management from
application clients is not required.

(from section 4.2.3:
"The J2EE Product Provider is not required to provide any transaction
management support for application clients.")

The spec only requires that java:comp/UserTransaction is made available to JSPs
and Servlets.

However, nothing says we can't support this so since you have expressed an
interest in it we will support it, however, if you use it, if might not work
with other J2EE servers.

Also, your way of getting the InitialContext is not recommended since your code
will contain references to Orion classes. Instead, put your properties in a
jndi.properties file.

Regards,
Karl Avedal

Robert Hargreaves wrote:

> This never works on my setup. Maybe I'm doing wrong. If I try, as suggested
> below I get this exception:
>
> javax.naming.NoInitialContextException: Need to specify class name in
> environment or system property, or as an applet parameter, or in an
> application resource file:  java.naming.factory.initial
>
> Then if I try my usual initialContext instantiation (which works for ALL
> other JNDI lookups)
>
>         Properties env = System.getProperties();
>         env.put("java.naming.factory.initial",
> "com.evermind.server.rmi.RMIInitialContextFactory");
>         env.put("java.naming.provider.url", "ormi://localhost/damanPay");
>         env.put("java.naming.security.principal", "admin");
>         env.put("java.naming.security.credentials", "123");
>         initCtx = new InitialContext(env);
>
> I get the following
>
> javax.naming.NameNotFoundException: java:comp/UserTransaction not found
>
> I've seen lots of postings on this mailing list about getting a
> UserTransaction instance into the client, and of those few that have had
> replies, none seem to work.
>
> Anyone else experience this?
>
> Regards
> Robert Hargreaves
>
> PS Also does anyone know of a class or utility that gives you a list of
> names bound to a particular JNDI context?
>
> > -----Original Message-----
> > From: Robert Krger [mailto:[EMAIL PROTECTED]]
> > Sent: 17 April 2000 07:55
> > To: Orion-Interest
> > Subject: Re: Transactions in client code
> >
> >
> > just like in any J2EE implementation:
> >
> >              Context initialContext =  new InitialContext();
> >              userTransaction =
> > (UserTransaction)initialContext.lookup("java:comp/UserTransaction");
> >
> >
> > robert


Reply via email to