Link to home
Start Free TrialLog in
Avatar of Manish
ManishFlag for India

asked on

Datasource

Hi,
   Currently we are using followign class for datasource in java application.(db is Oracle)
org.springframework.jndi.JndiObjectFactoryBean
But it is getting failed
weblogic.jdbc.rmi.internal.ConnectionImpl_weblogic_jdbc_wrapper_JTAConnection_weblogic_jdbc_wrapper_XAConnection_oracle_jdbc_driver_LogicalConnection_816_WLStub .

Then We have used,
org.springframework.jdbc.datasource.SingleConnectionDataSource

so it is working fine.

My Query is-
1. Is there any solution for error what we have got?
2. Is it ok to use SingleConnectionDataSource or  should we use DriverManagerDataSource?

Thanks for input.

-/Karan


Avatar of Manish

ASKER

Failing when we are using following entry.

<bean id="myDatasource" class="org.springframework.jndi.JndiObjectFactoryBean">
            <property name="jndiName"><value>${jndiName}</value></property>
            <property name="jndiEnvironment">
                  <props>
                        <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop>
                        <prop key="java.naming.provider.url">${url}</prop>
                        <prop key="java.naming.security.principal">${principal}</prop>
                                <prop key="java.naming.security.credentials">${credentials}</prop>
                         </props>
            </property>
      </bean>
Avatar of Manish

ASKER

I am not sure about drivers.
what abt this q?
2. Is it ok to use SingleConnectionDataSource or  should we use DriverManagerDataSource?

ASKER CERTIFIED SOLUTION
Avatar of chaitu chaitu
chaitu chaitu
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Manish

ASKER

First q answer is not clear.