WebLogic Server 7.0 Code Examples, BEA Systems, Inc.

examples.wtc.atmi.simpconv
Class TuxedoServerConversationBean

java.lang.Object
  |
  +--examples.wtc.atmi.simpconv.TuxedoServerConversationBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

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

ToupperBean is a stateful SessionBean. This EJBean illustrates:

Author:
Copyright (c) 1998-2002 by BEA Systems, Inc. All Rights Reserved.

Field Summary
(package private) static boolean VERBOSE
           
 
Constructor Summary
TuxedoServerConversationBean()
           
 
Method Summary
 void ejbActivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbCreate()
          This method corresponds to the create method in the home interface "ToupperHome.java".
 void ejbPassivate()
          This method is required by the EJB Specification, but is not used by this example.
 void ejbRemove()
          This method is required by the EJB Specification, but is not used by this example.
 weblogic.wtc.jatmi.Reply service(weblogic.wtc.jatmi.TPServiceInformation mydata)
          This is the classic TOUPPER simpapp method, which takes the string argument, and converts it to all upper case.
 void setSessionContext(javax.ejb.SessionContext ctx)
          Sets the session context.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

static final boolean VERBOSE
Constructor Detail

TuxedoServerConversationBean

public TuxedoServerConversationBean()
Method Detail

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
This method corresponds to the create method in the home interface "ToupperHome.java". The parameter sets of the two methods are identical. When the client calls ToupperHome.create(), the container allocates an instance of the EJBean and calls ejbCreate().
Throws:
javax.ejb.CreateException - if there is a problem creating the bean

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.
Specified by:
ejbRemove in interface javax.ejb.SessionBean

service

public weblogic.wtc.jatmi.Reply service(weblogic.wtc.jatmi.TPServiceInformation mydata)
                                 throws weblogic.wtc.jatmi.TPException
This is the classic TOUPPER simpapp method, which takes the string argument, and converts it to all upper case. This implementation will get the TuxedoConnectionFactory from JNDI, and use it to get a Tuxedo object, which can then be used to do the actual tpcall. Of course, we must first convert the java String object to the TypedBuffer TypedString object.
Parameters:
toConvert - A string to be converted (not null)
Returns:
the above string, converted to upper case

setSessionContext

public void setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context.
Specified by:
setSessionContext in interface javax.ejb.SessionBean
Parameters:
ctx - SessionContext Context for session

Documentation is available at
http://e-docs.bea.com/wls/docs70

Copyright © 2002 BEA Systems, Inc. All Rights Reserved.