jremote jbase5.2.1

com.jbase.jremote.jca
Class JRemoteConnectionFactoryImpl

java.lang.Object
  extended by com.jbase.jremote.jca.JRemoteConnectionFactoryImpl
All Implemented Interfaces:
JConnectionFactory, java.io.Serializable, javax.naming.Referenceable

public class JRemoteConnectionFactoryImpl
extends java.lang.Object
implements javax.resource.Referenceable, java.io.Serializable, JConnectionFactory

The concrete implementation of a remote jBASE connection factory.

This factory can be used from a managed and non managed environment (see Java Connector Architecture specification). In the managed environment an application server or other environment will supply a ManagedConnectionFactory that holds all the details for how to create a connection. For example a user name, host address, or account to connect to.

When used in a managed environment it is expected that this factory will be constructed with a ConnectionManager that offers connection pooling or a better level of service.

The non managed environment will use a default ConnectionManager that offers little or no support for connection pooling.

Author:
aphethean
See Also:
Serialized Form

Constructor Summary
JRemoteConnectionFactoryImpl()
          Construct a connection factory for use in a non managed environment using the default connection manager.
JRemoteConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory mcf)
          Construct a connection factory for use in a non managed environment using the default connection manager.
JRemoteConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory mcf, javax.resource.spi.ConnectionManager cm)
          Constructor for managed connection factory.
 
Method Summary
 JConnection getConnection()
          Get a connection to a remote jBASE instance.
 JConnection getConnection(JConnectionCallbackHandler handler)
          Get a connection to a remote jBASE instance, in a managed environment the callback handler provides ancillary connection initialisation.
 JConnection getConnection(java.lang.String user, java.lang.String password)
          Get a connection to a remote jBASE instance.
 JConnection getConnection(java.lang.String user, java.lang.String password, java.util.Properties props)
          Get a connection to a remote jBASE instance.
 JConnection getConnection(java.lang.String user, java.lang.String account, java.lang.String password)
          Get a connection to a remote jBASE account.
protected  JConnection getConnection(java.lang.String user, java.lang.String account, java.lang.String password, JConnectionCallbackHandler handler)
           
 javax.naming.Reference getReference()
           
 void setReference(javax.naming.Reference reference)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JRemoteConnectionFactoryImpl

public JRemoteConnectionFactoryImpl()

Construct a connection factory for use in a non managed environment using the default connection manager.

See Also:
DefaultConnectionManager

JRemoteConnectionFactoryImpl

public JRemoteConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory mcf)

Construct a connection factory for use in a non managed environment using the default connection manager.

See Also:
DefaultConnectionManager

JRemoteConnectionFactoryImpl

public JRemoteConnectionFactoryImpl(javax.resource.spi.ManagedConnectionFactory mcf,
                                    javax.resource.spi.ConnectionManager cm)

Constructor for managed connection factory. The application server will use this constructor and supply a configured ManagedConnectionFactory and ConnectionManager. This class will hook into the application server connection pool via the supplied ConnectionManager.

Method Detail

getConnection

public JConnection getConnection()
                          throws JRemoteException
Description copied from interface: JConnectionFactory

Get a connection to a remote jBASE instance.

Specified by:
getConnection in interface JConnectionFactory
Returns:
JConnection The connection
Throws:
JRemoteException

getConnection

public JConnection getConnection(java.lang.String user,
                                 java.lang.String password)
                          throws JRemoteException
Description copied from interface: JConnectionFactory

Get a connection to a remote jBASE instance.

Specified by:
getConnection in interface JConnectionFactory
Returns:
JConnection The connection
Throws:
JRemoteException

getConnection

public JConnection getConnection(java.lang.String user,
                                 java.lang.String password,
                                 java.util.Properties props)
                          throws JRemoteException
Description copied from interface: JConnectionFactory

Get a connection to a remote jBASE instance.

Specified by:
getConnection in interface JConnectionFactory
Returns:
JConnection The connection
Throws:
JRemoteException

getConnection

public JConnection getConnection(java.lang.String user,
                                 java.lang.String account,
                                 java.lang.String password)
                          throws JRemoteException
Description copied from interface: JConnectionFactory

Get a connection to a remote jBASE account.

Specified by:
getConnection in interface JConnectionFactory
Returns:
JConnection The connection
Throws:
JRemoteException

getConnection

public JConnection getConnection(JConnectionCallbackHandler handler)
                          throws JRemoteException
Description copied from interface: JConnectionFactory

Get a connection to a remote jBASE instance, in a managed environment the callback handler provides ancillary connection initialisation.

Specified by:
getConnection in interface JConnectionFactory
Returns:
JConnection The connection
Throws:
JRemoteException

getConnection

protected JConnection getConnection(java.lang.String user,
                                    java.lang.String account,
                                    java.lang.String password,
                                    JConnectionCallbackHandler handler)
                             throws JRemoteException
Throws:
JRemoteException

setReference

public void setReference(javax.naming.Reference reference)
See Also:
Referenceable.setReference(Reference)

getReference

public javax.naming.Reference getReference()
                                    throws javax.naming.NamingException
Specified by:
getReference in interface javax.naming.Referenceable
Throws:
javax.naming.NamingException
See Also:
Referenceable.getReference()

jremote jbase5.2.1

Copyright © 2010 TEMENOS. All Rights Reserved.