Rickard �berg wrote:
>
>
> The TM is available under JNDI (see the JTA spec.). What is not
> specified is the JNDI-name, but that's not a big problem, and I believe
> that it is correct not to specify this.
>

I'm sorry, but I don't see that specified anywhere in the JTA spec.  I
see where an object implementing the the "UserTransaction" interface is
specified to be available via JNDI (Page 9, Section 3.1.2); and I see
where resource factories (e.g. JDBC connections) are supposed to be
available via JNDI (Page 23, Section 4.1), but I don't see a specification
for how the TransactionManager is supposed to be accessed.

Indeed, section 4.1, which shows an example of the application server obtaining
an XA Resource and registering it with the Transaction Manager, includes these
code snippets:

        // Obtain the XAResource part of the connection and
        // register it with the transaction manager

        XAResource xares = res.getXAResource();
        (TransactionManager.getTransaction()).enlistResource(xares);

As written, this snippet won't compile, since it treats the
TransactionManager.getTransaction() method as a static method,
and TransactionManager is an interface and hence can't have
static methods.  So, I assume that this code is just a place-holder
for an application-server-specific way to find the object that
implements TransactionManager.

                                                        -Larry Allen
                                                         SilverStream Software

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to