I'm trying the obtain a UserTransaction via a JNDI lookup from an external (BeanShell) 
client. I'm using Jboss 3.2.3.

myUserTransaction = (UserTransaction) context.lookup("UserTransaction");
myUserTransaction.begin();

but get:

javax.transaction.SystemException: java.lang.RuntimeException: UT factory lookup 
failed: 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
        at 
org.jboss.tm.usertx.client.ClientUserTransaction.begin(ClientUserTransaction.java:107)

I've look at the offending code in JBoss and find this:

          try {
                 // Get a reference to the UT session factory.
                 UserTransactionSessionFactory factory;
                 factory = (UserTransactionSessionFactory)new 
InitialContext().lookup("UserTransactionSessionFactory");
                  // Call factory to get a UT session.
                  session = factory.newInstance();
               } catch (Exception ex) {
                 throw new RuntimeException("UT factory lookup failed: " + ex);
               }
 
>From the JBoss documentation it implies that I don't have to configure anything to 
>use UserTransaction because by default it's switch on.

Any help/advice would be greatly appricated.

Richard

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828109#3828109

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828109


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to