Hi Tejesh,

your jdo-conf seams to be ok. Below is the code castor uses to lookup TransactionManager from JNDI if you like to test. You should propable consult WebLogic docs on the proper JNDI name.

Having said that a stacktrace would would help us to give you more hints.



   /** The <a href="http://jakarta.apache.org/commons/logging/";>Jakarta
    *  Commons Logging</a> instance used for all logging. */
   private static final Log LOG = LogFactory.getLog(
           JNDIENCTransactionManagerFactory.class);
/** Default JNDI binding for <tt>javax.transaction.TransactionManager</tt>
    *  instance. */
public static final String TRANSACTION_MANAGER_NAME = "java:comp/TransactionManager";

   /** The name of the factory. */
   public static final String NAME = "jndi";

//--------------------------------------------------------------------------

   /**
* @see org.castor.transactionmanager.TransactionManagerFactory#getName()
    */
   public String getName() { return NAME; }

   /**
    * @see org.castor.transactionmanager.TransactionManagerFactory
    *      #getTransactionManager(java.util.Properties)
    */
public TransactionManager getTransactionManager(final Properties properties)
   throws TransactionManagerAcquireException {
String jndiENC = properties.getProperty("jndiEnc", TRANSACTION_MANAGER_NAME);
       Object found = null;
       TransactionManager transactionManager = null;
try {
           found = new InitialContext().lookup(jndiENC);
transactionManager = (TransactionManager) found; } catch (ClassCastException ex) { String msg = "Problem casting instance of " + found.getClass().getName()
                      + " to javax.transaction.TransactionManager.";
           LOG.error(msg);
           throw new TransactionManagerAcquireException(msg, ex);
       } catch (Exception ex) {
           String msg = "Unable to acquire instance of "
                      + "javax.transaction.TransactionManager: " + jndiENC;
           LOG.error(msg);
           throw new TransactionManagerAcquireException(msg, ex);
       }

       if (transactionManager == null) {
           String msg = "Unable to acquire instance of "
                      + "javax.transaction.TransactionManager: " + jndiENC;
           LOG.error(msg);
           throw new TransactionManagerAcquireException(msg);
       }
return transactionManager;
   }


Regards
Ralf
Castor JDO, committer


Tejesh Shetty schrieb:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jdo-conf PUBLIC "-//EXOLAB/Castor JDO Configuration DTD
Version 1.0//EN"
                           "http://castor.org/jdo-conf.dtd";>
<jdo-conf>
        <database name="CoreHub" engine="oracle">
                <jndi name="java:comp/env/jdbc/corehub"/>
                <mapping href="CoreHub.xml"/>
        </database>
   <transaction-demarcation mode="global">
    <transaction-manager name="jndi">
        <!--<param name="jndiEnc"
value="javax.transaction.TransactionManager"/>-->
       <param name="jndiEnc" value="java:comp/UserTransaction"/>

    </transaction-manager>
 </transaction-demarcation>
</jdo-conf>

Tejesh Shetty | Software Programmer, MortgageHub Inc. | Conshohocken, PA
| Tel: 610.834.3800 ext 106 | [EMAIL PROTECTED]

-----Original Message-----
From: Werner Guttmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 4:13 PM
To: [email protected]
Subject: Re: [castor-user] Castor Weblogic 8.1 transactionManager
returning null !!!

Hi,

what does your JDO config file look like ?

Regards
Werner

Tejesh Shetty wrote:
Hi,



I am trying to deploy an application on Weblogic 8.1 using castor
0.991.
Looks like EJB deploys well but during login when ejb tries to go get
something from database it dies saying unable to get database
connection. I did some test method and found out that it's not getting
transaction out of TransactionManager and its returning null. I am not
sure if jndi is not set up correctly in database.xml. Currently it
goes
look for "java:com/UserTransaction".I think other options were
"javax.transaction.TransactionManager" gives back the same exception.



Any help on this will be great.



Thanks in advance.





**Tejesh Shetty | ****Software Programmer, MortgageHub Inc. |
Conshohocken, PA | Tel: 610.834.3800 ext 106 | [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>m <mailto:[EMAIL PROTECTED]>**





-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------


-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------



-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to