jrunx.comp.sql
Class SQLInvokerBean

jrunx.comp.sql.SQLInvokerBean

public class SQLInvokerBean

A stateful session bean to handle invocations from remote JDBC resources (DataSources, Connections, Statemnts, and ResultSets).
Remote DataSources will be a rare exception to the more common local usage, as EJB's, JSP's, and servlets all access local DataSources. Even remote DataSource usage will involve only a handful of objects, so there is little overhead in handling this through a stateful session bean. Too, in using the EJB infrastructure, we conserve port usage for remote communications; all remote DataSource, Connection, etc. invocations occur over the same port used by all EJB containers.
This bean is created and used through the JRunDataSource ObjectFactory.
Invocations are strongly-typed, so a DataSource invocation must come specifically to the invokeDataSource operation (for example). All of these invocations are executed through the RemoteSQLProxy, which resides on the client's host.
This bean maps RemoteSQLIdentifiers to actual JDBC resources. The client-side RemoteSQLProxy maintains a similar map, in a method with the same name (mapResult) but that client-side map links the identifiers to the dynamic proxies rather than to the actual JDBC resources. The RemoteSQLIdentifer and the actual invocations, represented in RemoteSQLInvocation objects, are the only objects passed across the wire during remote JDBC resource handling.

Author:
PS Neville

Constructor Summary
SQLInvokerBean()
           
 
Method Summary
 void ejbActivate()
           
 void ejbCreate(java.lang.String poolName)
           
 void ejbPassivate()
           
 void ejbRemove()
           
 java.lang.String getPoolName()
           
 java.lang.Object invokeConnection(RemoteSQLInvocation invocation)
           
 java.lang.Object invokeDatabaseMetaData(RemoteSQLInvocation invocation)
           
 java.lang.Object invokeDataSource(RemoteSQLInvocation invocation)
           
 java.lang.Object invokeResultSet(RemoteSQLInvocation invocation)
           
 java.lang.Object invokeResultSetMetaData(RemoteSQLInvocation invocation)
           
 java.lang.Object invokeStatement(RemoteSQLInvocation invocation)
           
 void setSessionContext(javax.ejb.SessionContext ctx)
           
 

Constructor Detail

SQLInvokerBean

public SQLInvokerBean()
Method Detail

getPoolName

public java.lang.String getPoolName()
                             throws java.rmi.RemoteException

invokeDatabaseMetaData

public java.lang.Object invokeDatabaseMetaData(RemoteSQLInvocation invocation)
                                        throws java.rmi.RemoteException,
                                               java.sql.SQLException

invokeDataSource

public java.lang.Object invokeDataSource(RemoteSQLInvocation invocation)
                                  throws java.rmi.RemoteException,
                                         java.sql.SQLException

invokeConnection

public java.lang.Object invokeConnection(RemoteSQLInvocation invocation)
                                  throws java.rmi.RemoteException,
                                         java.sql.SQLException

invokeStatement

public java.lang.Object invokeStatement(RemoteSQLInvocation invocation)
                                 throws java.rmi.RemoteException,
                                        java.sql.SQLException

invokeResultSet

public java.lang.Object invokeResultSet(RemoteSQLInvocation invocation)
                                 throws java.rmi.RemoteException,
                                        java.sql.SQLException

invokeResultSetMetaData

public java.lang.Object invokeResultSetMetaData(RemoteSQLInvocation invocation)
                                         throws java.rmi.RemoteException,
                                                java.sql.SQLException

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException

ejbCreate

public void ejbCreate(java.lang.String poolName)
               throws javax.ejb.CreateException,
                      SQLInvokerException

ejbRemove

public void ejbRemove()

ejbActivate

public void ejbActivate()

ejbPassivate

public void ejbPassivate()


Copyright � 2002 Macromedia Corporation. All Rights Reserved.