com.xenonsoft.bridgetown.test.ejb
Class GreetingEJB

java.lang.Object
  extended bycom.xenonsoft.bridgetown.test.ejb.GreetingEJB
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class GreetingEJB
extends java.lang.Object
implements javax.ejb.SessionBean

Sample EJB this should be a remote bean

Version:
$Id: GreetingEJB.java,v 1.4 2005/03/20 17:51:02 peter_pilgrim Exp $
Author:
Peter Pilgrim, 19-Feb-2005 16:36:05
See Also:
Serialized Form

Constructor Summary
GreetingEJB()
          Default constructor
 
Method Summary
 void ejbActivate()
          Implements / overrides ejbActivate
 void ejbCreate()
          Implements ejb creation method for this session bean
 void ejbPassivate()
          Implements / overrides ejbPassivate
 void ejbRemove()
          Implements / overrides ejbRemove
 java.lang.String invokeJtaTransactionContext(java.lang.String name)
          Invoke a test to verify operation of the virtual JTA platform transaction interface: the service manager JtaTransactionServiceManager, the session factory JtaTransactionSession, and the transaction context JtaTransactionContext, KISS: In order to verify the functionality of the transaction service manager implementation Ww do not use any JDBC or JConnector transactional resource.
protected  java.lang.String invokeRequiresNewTransaction()
          Test requires new transaction of the Jta Transaction Service Manager.
 java.lang.String makeHelloWorld(java.lang.String name)
          Generate a greeting
 void setSessionContext(javax.ejb.SessionContext sessionContext)
          Implements / overrides setSessionContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GreetingEJB

public GreetingEJB()
Default constructor

Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext sessionContext)
                       throws javax.ejb.EJBException,
                              java.rmi.RemoteException
Implements / overrides setSessionContext

Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
sessionContext -
Throws:
javax.ejb.EJBException
java.rmi.RemoteException
See Also:
SessionBean.setSessionContext(javax.ejb.SessionContext)

ejbRemove

public void ejbRemove()
               throws javax.ejb.EJBException,
                      java.rmi.RemoteException
Implements / overrides ejbRemove

Specified by:
ejbRemove in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException
See Also:
SessionBean.ejbRemove()

ejbActivate

public void ejbActivate()
                 throws javax.ejb.EJBException,
                        java.rmi.RemoteException
Implements / overrides ejbActivate

Specified by:
ejbActivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException
See Also:
SessionBean.ejbActivate()

ejbCreate

public void ejbCreate()
               throws javax.ejb.EJBException
Implements ejb creation method for this session bean

Throws:
javax.ejb.EJBException

ejbPassivate

public void ejbPassivate()
                  throws javax.ejb.EJBException,
                         java.rmi.RemoteException
Implements / overrides ejbPassivate

Specified by:
ejbPassivate in interface javax.ejb.SessionBean
Throws:
javax.ejb.EJBException
java.rmi.RemoteException
See Also:
SessionBean.ejbPassivate()

makeHelloWorld

public java.lang.String makeHelloWorld(java.lang.String name)
Generate a greeting

Parameters:
name - the name
Returns:
message greeting

invokeJtaTransactionContext

public java.lang.String invokeJtaTransactionContext(java.lang.String name)
Invoke a test to verify operation of the virtual JTA platform transaction interface: the service manager JtaTransactionServiceManager, the session factory JtaTransactionSession, and the transaction context JtaTransactionContext,

KISS: In order to verify the functionality of the transaction service manager implementation Ww do not use any JDBC or JConnector transactional resource. In other empty transactions

Parameters:
name - an arbitary parameter
Returns:
a debug output message as a String

invokeRequiresNewTransaction

protected java.lang.String invokeRequiresNewTransaction()
Test requires new transaction of the Jta Transaction Service Manager. This method will invoke the other SecondaryEJB and call its business method.

This test should verify the suspension and resumption mechanism are being delegated to the real JTA provider, since the IoC container does not really perform these functions for us.

Returns:
message result


Copyright © 2005 XeNoNSoFT.com. All Rights Reserved.