You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by SalmasCM <sa...@criticalmass.com> on 2009/03/02 23:30:11 UTC

WebLogic JNDI and MSSQL Bundle PM

I am trying to use the bundle PM with a datasource that I have setup in
Weblogic

Things work fine with the JNDI PM

    	<PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager">
		                           
		
		
	</PersistenceManager>

However, when I try to use the bundle PM (I'm using the WL context factory
otherwise the datasource isn't found at all)

<PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager">
  
  
  
</PersistenceManager>


and I get an exception with "no suitable driver" . It's definitely getting
to the bundle PM but the bundle PM doesn't seem to know how to create a db
connection from the datasource. Any ideas? I'd like to combine the
connection pooling of weblogic with the speed of the bundle PM.

-- 
View this message in context: http://www.nabble.com/WebLogic-JNDI-and-MSSQL-Bundle-PM-tp22298319p22298319.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: WebLogic JNDI and MSSQL Bundle PM

Posted by SalmasCM <sa...@criticalmass.com>.

Sorry I am so late replying.

weblogic.jndi.WLInitialContextFactory is NOT a javax.naming.Context

http://e-docs.bea.com/wls/docs70/javadocs/weblogic/jndi/WLInitialContextFactory.html

However, I cannot find the WL datasource using a regular JNDIContext, at
least it doesn't work when I try it. If anyone had a different experience
please let me know!

So it seems that I cannot do this if my datasource is in WL?

Regards



Thomas Müller-2 wrote:
> 
> Hi,
> 
> What version of Jackrabbit do you use? This should be supported in
> Jackrabbit 1.3.x, but I'm not sure which version exactly (see
> https://issues.apache.org/jira/browse/JCR-948 )
> 
> Is weblogic.jndi.WLInitialContextFactory a javax.naming.Context? The
> check made in Jackrabbit (version 1.5 is:
> Class d = Class.forName(driver);
> if (javax.naming.Context.class.isAssignableFrom(d)) {
>   // JNDI context
>   ...
> } else {
>   // JDBC driver
> }
> 
> Regards,
> Thomas
> 
> On Mon, Mar 2, 2009 at 11:37 PM, SalmasCM <sa...@criticalmass.com> wrote:
>>
>> Sorry, I didn't escape things properly so some stuff was missing in my
>> original post.
>>
>>
>> I am trying to use the bundle PM with a datasource that I have setup in
>> Weblogic
>>
>> Things work fine with the JNDI PM
>>
>>        &lt;PersistenceManager
>> class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager"&gt;
>>                &lt;param name="dataSourceLocation" value="/MY_DS" /&gt;
>>                &lt;param name="schema" value="mssql" /&gt;
>>                &lt;param name="externalBLOBs" value="false" /&gt;
>>        &lt;/PersistenceManager&gt;
>>
>> However, when I try to use the bundle PM (I'm using the WL context
>> factory
>> otherwise the datasource isn't found at all)
>>
>> &lt;PersistenceManager
>> class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager"&gt;
>>  &lt;param name="driver" value="weblogic.jndi.WLInitialContextFactory"
>> /&gt;
>>  &lt;param name="url" value="jdbc/MY_DS" /&gt;
>>  &lt;param name="schema" value="mssql" /&gt;
>> &lt;/PersistenceManager&gt;
>>
>>
>> and I get an exception with "no suitable driver" . It's definitely
>> getting
>> to the bundle PM but the bundle PM doesn't seem to know how to create a
>> db
>> connection from the datasource. Any ideas? I'd like to combine the
>> connection pooling of weblogic with the speed of the bundle PM.
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WebLogic-JNDI-and-MSSQL-Bundle-PM-tp22298319p22298448.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/WebLogic-JNDI-and-MSSQL-Bundle-PM-tp22298319p22478866.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: WebLogic JNDI and MSSQL Bundle PM

Posted by Thomas Müller <th...@day.com>.
Hi,

What version of Jackrabbit do you use? This should be supported in
Jackrabbit 1.3.x, but I'm not sure which version exactly (see
https://issues.apache.org/jira/browse/JCR-948 )

Is weblogic.jndi.WLInitialContextFactory a javax.naming.Context? The
check made in Jackrabbit (version 1.5 is:
Class d = Class.forName(driver);
if (javax.naming.Context.class.isAssignableFrom(d)) {
  // JNDI context
  ...
} else {
  // JDBC driver
}

Regards,
Thomas

On Mon, Mar 2, 2009 at 11:37 PM, SalmasCM <sa...@criticalmass.com> wrote:
>
> Sorry, I didn't escape things properly so some stuff was missing in my
> original post.
>
>
> I am trying to use the bundle PM with a datasource that I have setup in
> Weblogic
>
> Things work fine with the JNDI PM
>
>        &lt;PersistenceManager
> class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager"&gt;
>                &lt;param name="dataSourceLocation" value="/MY_DS" /&gt;
>                &lt;param name="schema" value="mssql" /&gt;
>                &lt;param name="externalBLOBs" value="false" /&gt;
>        &lt;/PersistenceManager&gt;
>
> However, when I try to use the bundle PM (I'm using the WL context factory
> otherwise the datasource isn't found at all)
>
> &lt;PersistenceManager
> class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager"&gt;
>  &lt;param name="driver" value="weblogic.jndi.WLInitialContextFactory"
> /&gt;
>  &lt;param name="url" value="jdbc/MY_DS" /&gt;
>  &lt;param name="schema" value="mssql" /&gt;
> &lt;/PersistenceManager&gt;
>
>
> and I get an exception with "no suitable driver" . It's definitely getting
> to the bundle PM but the bundle PM doesn't seem to know how to create a db
> connection from the datasource. Any ideas? I'd like to combine the
> connection pooling of weblogic with the speed of the bundle PM.
>
>
> --
> View this message in context: http://www.nabble.com/WebLogic-JNDI-and-MSSQL-Bundle-PM-tp22298319p22298448.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: WebLogic JNDI and MSSQL Bundle PM

Posted by SalmasCM <sa...@criticalmass.com>.
Sorry, I didn't escape things properly so some stuff was missing in my
original post.


I am trying to use the bundle PM with a datasource that I have setup in
Weblogic

Things work fine with the JNDI PM

    	&lt;PersistenceManager
class="org.apache.jackrabbit.core.persistence.db.JNDIDatabasePersistenceManager"&gt;
		&lt;param name="dataSourceLocation" value="/MY_DS" /&gt;                           
		&lt;param name="schema" value="mssql" /&gt;
		&lt;param name="externalBLOBs" value="false" /&gt;
	&lt;/PersistenceManager&gt;

However, when I try to use the bundle PM (I'm using the WL context factory
otherwise the datasource isn't found at all)

&lt;PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.MSSqlPersistenceManager"&gt;
  &lt;param name="driver" value="weblogic.jndi.WLInitialContextFactory"
/&gt;
  &lt;param name="url" value="jdbc/MY_DS" /&gt;
  &lt;param name="schema" value="mssql" /&gt;
&lt;/PersistenceManager&gt;


and I get an exception with "no suitable driver" . It's definitely getting
to the bundle PM but the bundle PM doesn't seem to know how to create a db
connection from the datasource. Any ideas? I'd like to combine the
connection pooling of weblogic with the speed of the bundle PM.


-- 
View this message in context: http://www.nabble.com/WebLogic-JNDI-and-MSSQL-Bundle-PM-tp22298319p22298448.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.