users@glassfish.java.net

Re: Websphere 5.x to Glassfish App Conversion

From: <glassfish_at_javadesktop.org>
Date: Thu, 06 Nov 2008 10:04:05 PST

I'm not sure if this is what you're looking for so I'm sorry if it's something altogether different.

I don't know much java but this is how we lookup glassfish transaction manager to access from our transaction service.

  public static final String JNDI_TRANSACTION_MANAGER_NAME = "java:appserver/TransactionManager";


  public TransactionManager getTransactionManager()
  {
    try
    {
      return (TransactionManager) (new InitialContext())
        .lookup(JNDI_TRANSACTION_MANAGER_NAME);
    }
    catch (NamingException e)
    {
      throw new RuntimeException(e);
    }
  }

I hope this helps but if its totally off topic I apologize.

Andrew
[Message sent by forum member 'areplogle' (areplogle)]

http://forums.java.net/jive/thread.jspa?messageID=315305