examples.wtc.atmi.simpapp
Class ToupperBean
java.lang.Object
|
+--examples.wtc.atmi.simpapp.ToupperBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- public class ToupperBean
- extends java.lang.Object
- implements javax.ejb.SessionBean
ToupperBean is a stateful SessionBean. This EJBean illustrates:
- The use of the Tuxedo Oatmial connector
- The use of Application-defined exceptions
- Author:
- Copyright (c) 1998-2002 by BEA Systems, Inc. All Rights Reserved.
|
Field Summary |
(package private) static boolean |
VERBOSE
|
|
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. |
void |
setSessionContext(javax.ejb.SessionContext ctx)
Sets the session context. |
java.lang.String |
Toupper(java.lang.String toConvert)
This is the classic TOUPPER simpapp method, which takes the string
argument, and converts it to all upper case. |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERBOSE
static final boolean VERBOSE
ToupperBean
public ToupperBean()
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
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
Toupper
public java.lang.String Toupper(java.lang.String toConvert)
throws weblogic.wtc.jatmi.TPException,
weblogic.wtc.jatmi.TPReplyException
- 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
Copyright © 2002 BEA Systems, Inc. All Rights Reserved.