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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to