db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/src/jca/org/apache/ojb/otm/connector JCAKit.java OTMJCAManagedConnectionFactory.java
Date Mon, 06 Dec 2004 10:54:17 GMT
arminw      2004/12/06 02:54:17

  Modified:    src/jca/org/apache/ojb/otm/connector JCAKit.java
                        OTMJCAManagedConnectionFactory.java
  Log:
  fix + workaround to make OTM compile
  
  Revision  Changes    Path
  1.5       +15 -0     db-ojb/src/jca/org/apache/ojb/otm/connector/JCAKit.java
  
  Index: JCAKit.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/jca/org/apache/ojb/otm/connector/JCAKit.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- JCAKit.java	5 Apr 2004 00:41:38 -0000	1.4
  +++ JCAKit.java	6 Dec 2004 10:54:16 -0000	1.5
  @@ -17,6 +17,7 @@
   
   import org.apache.ojb.broker.Identity;
   import org.apache.ojb.broker.PBKey;
  +import org.apache.ojb.broker.PersistenceConfiguration;
   import org.apache.ojb.otm.Kit;
   import org.apache.ojb.otm.OTMConnection;
   import org.apache.ojb.otm.copy.ObjectCopyStrategy;
  @@ -83,6 +84,20 @@
   			throw new OTMConnectionRuntimeException(ex);
   		}
   	}
  +
  +    public OTMConnection acquireConnection(PersistenceConfiguration persistenceConf)
  +    {
  +        Util.log("In JCAKit.getConnection,1");
  +		try
  +		{
  +			OTMConnectionRequestInfo info = new OTMConnectionRequestInfo(persistenceConf.getKey());
  +			return (OTMConnection) m_connectionManager.allocateConnection(m_managedConnectionFactory,
info);
  +		}
  +		catch (ResourceException ex)
  +		{
  +			throw new OTMConnectionRuntimeException(ex);
  +		}
  +    }
   
   	public Transaction getTransaction(OTMConnection otmConnection)
   	{
  
  
  
  1.4       +7 -1      db-ojb/src/jca/org/apache/ojb/otm/connector/OTMJCAManagedConnectionFactory.java
  
  Index: OTMJCAManagedConnectionFactory.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/jca/org/apache/ojb/otm/connector/OTMJCAManagedConnectionFactory.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- OTMJCAManagedConnectionFactory.java	5 Apr 2004 00:41:39 -0000	1.3
  +++ OTMJCAManagedConnectionFactory.java	6 Dec 2004 10:54:16 -0000	1.4
  @@ -16,6 +16,7 @@
    */
   
   import org.apache.ojb.broker.PBKey;
  +import org.apache.ojb.broker.PersistenceConfiguration;
   import org.apache.ojb.otm.Kit;
   import org.apache.ojb.otm.OTMConnection;
   import org.apache.ojb.otm.kit.SimpleKit;
  @@ -87,7 +88,12 @@
   		{
   			Kit kit = getKit();
   			PBKey key = ((OTMConnectionRequestInfo) info).getPbKey();
  -			OTMConnection connection = kit.acquireConnection(key);
  +            if(true)
  +            {
  +                // TODO: Fix this! aquireConnection needs a PC instance
  +                throw new UnsupportedOperationException("TODO: Fix this! aquireConnection
needs a PC instance");
  +            }
  +			OTMConnection connection = kit.acquireConnection(null);
   			return new OTMJCAManagedConnection(this, connection, key);
   		}
   		catch (ResourceException e)
  
  
  

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


Mime
View raw message