You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Marwane <am...@gmail.com> on 2006/11/08 18:24:47 UTC
Need OJB config with Websphere DataSource JNDI
Hi,
if someone has configured OJB with websphere datasource jndi ???
thx a lot
Re: Need OJB config with Websphere DataSource JNDI
Posted by Armin Waibel <ar...@apache.org>.
Hi,
Marwane wrote:
>
> In my code , i use PB transaction , broker.beginTransaction ,
> commitTransaction ..
> with PersistenceBrokerFactorySyncImpl it give me an error that
> beginTransaction dont supported .
In managed environments (using JTA) it's not allowed to use PB-tx
demarcation. In this case you have to use container- or bean-managed tx
provided by JTA.
>
> I used the default impl
> PersistenceBrokerFactoryClass=
> org.apache.ojb.broker.core.PersistenceBrokerFactoryImpl
> with this factory my search queries in the application work good with the
> JNDI of Websphere , but withe CRUD Operation wiche using transaction dont
> work : transaction Boundary some thing like this....
> i think is problem withe transaction JTA and Websphere !!!!! can you
> help me
> ????
The same problem again I think. If the datasource only supports JTA-tx
you can't use the PB-tx. If you don't need distributed tx (XA-tx) it
should be possible to configure Websphere to use unshareable connections
then it should be possible to use servlets with PB-tx (in this case each
PB instance will represent a single connection). But put no trust in my
words, I'm not a Websphere expert ;-)
regards,
Armin
>
>
>
> thx
>
>
>
> On 11/9/06, sachin@mechsoftgroup.com <sa...@mechsoftgroup.com> wrote:
>>
>> Create datasource on websphere as CMP & create JNDI for that.
>> Create its local reference for project(in our case, we set reference in
>> web.xml)
>> & map it in repositiry file as follows.
>>
>> <jdbc-connection-descriptor
>>
>> jcd-alias="SQLJDBCProvider"
>>
>> default-connection="true"
>>
>> platform="MsSQLServer"
>>
>> jdbc-level="3.0"
>>
>> jndi-datasource-name="java:comp/env/dsForB2C"
>>
>> >
>>
>>
>> ----- Original Message -----
>> From: "Marwane" <am...@gmail.com>
>> To: "OJB Users List" <oj...@db.apache.org>
>> Sent: Wednesday, November 08, 2006 10:54 PM
>> Subject: Need OJB config with Websphere DataSource JNDI
>>
>>
>> > Hi,
>> > if someone has configured OJB with websphere datasource jndi ???
>> > thx a lot
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Need OJB config with Websphere DataSource JNDI
Posted by Marwane <am...@gmail.com>.
Thx,
1. Create its local reference for project(in our case, we set reference in
web.xml) ???
2. i used all things described in site.pdf of OJB about using JNDI,
repository.xml :
jndi-datasource-name="jdbc/myDs"
username="sa"
password=""
batch-mode="false"
useAutoCommit="0"
ignoreAutoCommitExceptions="false"
<sequence-manager
className="org.apache.ojb.broker.util.sequence.SequenceManagerNextValImpl">
</sequence-manager>
OJB.properties :
PersistenceBrokerFactoryClass=
org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
ConnectionFactoryClass=
org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
JTATransactionManagerClass=
org.apache.ojb.tm.transaction.factory.WebsphereTransactionManagerFactory
In my code , i use PB transaction , broker.beginTransaction ,
commitTransaction ..
with PersistenceBrokerFactorySyncImpl it give me an error that
beginTransaction dont supported .
I used the default impl
PersistenceBrokerFactoryClass=
org.apache.ojb.broker.core.PersistenceBrokerFactoryImpl
with this factory my search queries in the application work good with the
JNDI of Websphere , but withe CRUD Operation wiche using transaction dont
work : transaction Boundary some thing like this....
i think is problem withe transaction JTA and Websphere !!!!! can you help me
????
thx
On 11/9/06, sachin@mechsoftgroup.com <sa...@mechsoftgroup.com> wrote:
>
> Create datasource on websphere as CMP & create JNDI for that.
> Create its local reference for project(in our case, we set reference in
> web.xml)
> & map it in repositiry file as follows.
>
> <jdbc-connection-descriptor
>
> jcd-alias="SQLJDBCProvider"
>
> default-connection="true"
>
> platform="MsSQLServer"
>
> jdbc-level="3.0"
>
> jndi-datasource-name="java:comp/env/dsForB2C"
>
> >
>
>
> ----- Original Message -----
> From: "Marwane" <am...@gmail.com>
> To: "OJB Users List" <oj...@db.apache.org>
> Sent: Wednesday, November 08, 2006 10:54 PM
> Subject: Need OJB config with Websphere DataSource JNDI
>
>
> > Hi,
> > if someone has configured OJB with websphere datasource jndi ???
> > thx a lot
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
Re: Need OJB config with Websphere DataSource JNDI
Posted by sa...@mechsoftgroup.com.
Create datasource on websphere as CMP & create JNDI for that.
Create its local reference for project(in our case, we set reference in
web.xml)
& map it in repositiry file as follows.
<jdbc-connection-descriptor
jcd-alias="SQLJDBCProvider"
default-connection="true"
platform="MsSQLServer"
jdbc-level="3.0"
jndi-datasource-name="java:comp/env/dsForB2C"
>
----- Original Message -----
From: "Marwane" <am...@gmail.com>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Wednesday, November 08, 2006 10:54 PM
Subject: Need OJB config with Websphere DataSource JNDI
> Hi,
> if someone has configured OJB with websphere datasource jndi ???
> thx a lot
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org