All Examples  All WebLogic Enterprise Connectivity Examples  EJB Simpapp Example

examples.wlec.ejb.simpapp
Class ConverterBean

examples.wlec.ejb.simpapp.ConverterBean

public class ConverterBean

ConverterBean is a stateless SessionBean. This bean illustrates:


Constructor Summary
ConverterBean()
           
 
Method Summary
protected  ConverterResult convert(java.lang.String changeCase, java.lang.String mixed)
           
 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 ConverterHome.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(examples.wlec.ejb.simpapp.SessionContext ctx)
          Sets the session context.
 ConverterResult toLower(java.lang.String mixed)
          Converts the string to lowercase
 ConverterResult toUpper(java.lang.String mixed)
          Converts the string to uppercase
 

Constructor Detail

ConverterBean

public ConverterBean()
Method Detail

ejbActivate

public void ejbActivate()
This method is required by the EJB Specification, but is not used by this example.

ejbRemove

public void ejbRemove()
This method is required by the EJB Specification, but is not used by this example.

ejbPassivate

public void ejbPassivate()
This method is required by the EJB Specification, but is not used by this example.

setSessionContext

public void setSessionContext(examples.wlec.ejb.simpapp.SessionContext ctx)
Sets the session context.
Parameters:
ctx - SessionContext Context for session

ejbCreate

public void ejbCreate()
               throws examples.wlec.ejb.simpapp.CreateException
This method corresponds to the create method in the home interface ConverterHome.java. The parameter sets of these two methods are identical. When the client calls the ConverterHome.create method, the container allocates an instance of the EJBean and calls the ejbCreate method.
Throws:
examples.wlec.ejb.simpapp.CreateException - if there is an error while initializing the IIOP pool
See Also:
Converter

toUpper

public ConverterResult toUpper(java.lang.String mixed)
                        throws ProcessingErrorException
Converts the string to uppercase
Parameters:
mixed - String Input data
Returns:
ConverterResult Conversion Result
Throws:
ProcessingErrorException - if there is an error while converting the string

toLower

public ConverterResult toLower(java.lang.String mixed)
                        throws ProcessingErrorException
Converts the string to lowercase
Parameters:
mixed - String Input data
Returns:
ConverterResult Conversion Result
Throws:
ProcessingErrorException - if there is an error while converting the string

convert

protected ConverterResult convert(java.lang.String changeCase,
                                  java.lang.String mixed)
                           throws ProcessingErrorException