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 ol...@allianz.de on 2003/08/20 11:24:06 UTC

Configure OJB in WAS Testenvironment

Hi to all,

can anybody please tell me how OJB has to be configured to use the
Webshere Application Server connection pooling? We are using the
 WAS 4.03 Testenvironment and OJB RC4.

The following configuration is used:
- OJB-properties:
...
-------------------------------------------------------------------------------------
# ConnectionFactory / Default ConnectionPool
#------------------------------------------------------------------------------------
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
...
#----------------------------------------------------------------------------------------
# Transaction Management and assocation
#----------------------------------------------------------------------------------------
OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager

JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory
...

- repository_database.xml
 <jdbc-connection-descriptor
            jcd-alias="default"
            default-connection="true"
            platform="Db2"
            jdbc-level="2.0"
            protocol="jdbc"
            subprotocol="db2"
            dbalias="LSI1"
            username="myname"
            password="mypassword"
              eager-release="false"
            batch-mode="false"
        useAutoCommit="1"
        ignoreAutoCommitExceptions="false"
     >
        <connection-pool
            maxActive="21"
            validationQuery="" />
        <sequence-manager className
="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
            <attribute attribute-name="grabSize" attribute-value
="20"/>
            <attribute attribute-name="autoNaming" attribute-value
="true"/>
            <attribute attribute-name="globalSequenceId"
attribute-value="false"/>
            <attribute attribute-name="globalSequenceStart"
attribute-value="10000"/>
        </sequence-manager>
   </jdbc-connection-descriptor>

Here is the code :

      PersistenceBroker broker;
      Query q;
      Collection results;

      broker = PersistenceBrokerFactory.defaultPersistenceBroker
();

      broker.beginTransaction();

and we get the following exception in broker.beginTransaction:

IEx=UnsupportedOperationException
    detailMessage=Not supported in managed environment"

Thanks a lot.
Oliver

Remark: Using the OJB connection Pooling everything works fine!



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


OJB / MS SQL Server

Posted by LAURENT Stephane <bi...@sportmalin.com>.
Hi,
is anybody working with SQL Server 7 ?
can't find free JDBC driver working fine ...
can you send me your repository_database and where to find good driver ?
Microsoft's driver work only with SQL Server2000, where can I find  V7
compatible version ?
actualy use com.jnetdirect.jsql.JSQLDriver,  but without connection pool to
stay on free licence.
Help please !
Thanks
----- Original Message ----- 
From: "Michael Becke" <be...@u.washington.edu>
To: "OJB Users List" <oj...@db.apache.org>
Sent: Wednesday, August 20, 2003 2:34 PM
Subject: Re: Configure OJB in WAS Testenvironment


> Oliver,
>
> The WebSphereTransactionManagerFactory included in RC4 does not work in
> WAS 4.  This has been fixed in the latest version in CVS.
>
> Mike
>
> On Wednesday, August 20, 2003, at 05:24 AM, oliver.urbitsch@allianz.de
> wrote:
>
> > Hi to all,
> >
> > can anybody please tell me how OJB has to be configured to use the
> > Webshere Application Server connection pooling? We are using the
> >  WAS 4.03 Testenvironment and OJB RC4.
> >
> > The following configuration is used:
> > - OJB-properties:
> > ...
> > ----------------------------------------------------------------------- 
> > --------------
> > # ConnectionFactory / Default ConnectionPool
> > #---------------------------------------------------------------------- 
> > --------------
> > ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFact
> > oryManagedImpl
> > ...
> > #---------------------------------------------------------------------- 
> > ------------------
> > # Transaction Management and assocation
> > #---------------------------------------------------------------------- 
> > ------------------
> > OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
> >
> > JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTra
> > nsactionManagerFactory
> > ...
> >
> > - repository_database.xml
> >  <jdbc-connection-descriptor
> >             jcd-alias="default"
> >             default-connection="true"
> >             platform="Db2"
> >             jdbc-level="2.0"
> >             protocol="jdbc"
> >             subprotocol="db2"
> >             dbalias="LSI1"
> >             username="myname"
> >             password="mypassword"
> >               eager-release="false"
> >             batch-mode="false"
> >         useAutoCommit="1"
> >         ignoreAutoCommitExceptions="false"
> >>
> >         <connection-pool
> >             maxActive="21"
> >             validationQuery="" />
> >         <sequence-manager className
> > ="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
> >             <attribute attribute-name="grabSize" attribute-value
> > ="20"/>
> >             <attribute attribute-name="autoNaming" attribute-value
> > ="true"/>
> >             <attribute attribute-name="globalSequenceId"
> > attribute-value="false"/>
> >             <attribute attribute-name="globalSequenceStart"
> > attribute-value="10000"/>
> >         </sequence-manager>
> >    </jdbc-connection-descriptor>
> >
> > Here is the code :
> >
> >       PersistenceBroker broker;
> >       Query q;
> >       Collection results;
> >
> >       broker = PersistenceBrokerFactory.defaultPersistenceBroker
> > ();
> >
> >       broker.beginTransaction();
> >
> > and we get the following exception in broker.beginTransaction:
> >
> > IEx=UnsupportedOperationException
> >     detailMessage=Not supported in managed environment"
> >
> > Thanks a lot.
> > Oliver
> >
> > Remark: Using the OJB connection Pooling everything works fine!
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Configure OJB in WAS Testenvironment

Posted by Michael Becke <be...@u.washington.edu>.
Oliver,

The WebSphereTransactionManagerFactory included in RC4 does not work in  
WAS 4.  This has been fixed in the latest version in CVS.

Mike

On Wednesday, August 20, 2003, at 05:24 AM, oliver.urbitsch@allianz.de  
wrote:

> Hi to all,
>
> can anybody please tell me how OJB has to be configured to use the
> Webshere Application Server connection pooling? We are using the
>  WAS 4.03 Testenvironment and OJB RC4.
>
> The following configuration is used:
> - OJB-properties:
> ...
> ----------------------------------------------------------------------- 
> --------------
> # ConnectionFactory / Default ConnectionPool
> #---------------------------------------------------------------------- 
> --------------
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFact 
> oryManagedImpl
> ...
> #---------------------------------------------------------------------- 
> ------------------
> # Transaction Management and assocation
> #---------------------------------------------------------------------- 
> ------------------
> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>
> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTra 
> nsactionManagerFactory
> ...
>
> - repository_database.xml
>  <jdbc-connection-descriptor
>             jcd-alias="default"
>             default-connection="true"
>             platform="Db2"
>             jdbc-level="2.0"
>             protocol="jdbc"
>             subprotocol="db2"
>             dbalias="LSI1"
>             username="myname"
>             password="mypassword"
>               eager-release="false"
>             batch-mode="false"
>         useAutoCommit="1"
>         ignoreAutoCommitExceptions="false"
>>
>         <connection-pool
>             maxActive="21"
>             validationQuery="" />
>         <sequence-manager className
> ="org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
>             <attribute attribute-name="grabSize" attribute-value
> ="20"/>
>             <attribute attribute-name="autoNaming" attribute-value
> ="true"/>
>             <attribute attribute-name="globalSequenceId"
> attribute-value="false"/>
>             <attribute attribute-name="globalSequenceStart"
> attribute-value="10000"/>
>         </sequence-manager>
>    </jdbc-connection-descriptor>
>
> Here is the code :
>
>       PersistenceBroker broker;
>       Query q;
>       Collection results;
>
>       broker = PersistenceBrokerFactory.defaultPersistenceBroker
> ();
>
>       broker.beginTransaction();
>
> and we get the following exception in broker.beginTransaction:
>
> IEx=UnsupportedOperationException
>     detailMessage=Not supported in managed environment"
>
> Thanks a lot.
> Oliver
>
> Remark: Using the OJB connection Pooling everything works fine!
>
>
>
> ---------------------------------------------------------------------
> 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