WebLogic Process Integrator Version 1.1

com.bea.wlpi.common
Class EJBInvocationDescriptor

java.lang.Object
  |
  +--com.bea.wlpi.common.EJBInvocationDescriptor

public class EJBInvocationDescriptor
extends java.lang.Object
implements java.io.Serializable

Describes and implements the invocation of a method in an arbitrary Enterprise Java Bean. It is used to obtain a remote reference to an EJB and invoke a remote method thereon.

See Also:
ClassDescriptor, ClassInvocationDescriptor, EJBDescriptor, Serialized Form

Constructor Summary
EJBInvocationDescriptor()
          Create a new EJB descriptor object.
EJBInvocationDescriptor(java.lang.String description, EJBDescriptor beanDescriptor, MethodDescriptor homeMethodDescriptor, java.lang.String[] homeParmDescriptions, MethodDescriptor remoteMethodDescriptor, java.lang.String[] remoteParmDescriptions)
          Create a new EJB descriptor object.
 
Method Summary
 java.lang.String getDescription()
          Return the human-readable bean description.
 java.lang.String getEJBDeploymentName()
          Return the EJB deployment name.
 MethodDescriptor getEJBHomeMethod()
          Return the home method to invoke.
 java.lang.String getEJBHomeName()
          Return the home interface name.
 java.lang.String getEJBPrimaryKeyName()
          Return the primary key class name.
 MethodDescriptor getEJBRemoteMethod()
          Return the remote method to invoke.
 java.lang.String getEJBRemoteName()
          Return the remote interface name.
 java.lang.String[] getHomeParmsDescriptions()
          Return the parameter descriptions for the home method to invoke.
 java.lang.String getId()
          Return the system-assigned unique identifier.
 java.lang.String[] getRemoteParmsDescriptions()
          Return the parameter descriptions for the remote method to invoke.
 java.lang.String getReturnTypeName()
          Get the remote method return type.
 java.lang.Object invoke(java.util.Properties environment, java.lang.Object[] ejbHomeParameters, java.lang.Object[] ejbRemoteParameters)
          Create a remote object reference; then, invoke a method on it.
 java.lang.Object invokeHomeMethod(java.util.Properties environment, java.lang.Object[] ejbHomeParameters)
          Create a home object reference; then, invoke a method on it.
 java.lang.Object invokeRemoteMethod(java.lang.Object remoteObject, java.lang.Object[] ejbRemoteParameters)
          Invoke a method on a remote object.
 boolean isFullyFormed()
          Check whether this descriptor has all required values set.
 boolean isVerbose()
          Check whether the invokeXXX() methods emit debugging messages.
 void set(java.lang.String description, EJBDescriptor beanDescriptor, MethodDescriptor homeMethodDescriptor, java.lang.String[] homeParmDescriptions, MethodDescriptor remoteMethodDescriptor, java.lang.String[] remoteParmDescriptions)
          Set descriptor values.
 void setEJBDeploymentName(java.lang.String deploymentName)
          Set the EJB deployment name.
 void setEJBHomeMethod(MethodDescriptor ejbHomeMethod)
          Set the home method to invoke.
 void setEJBHomeName(java.lang.String ejbHomeName)
          Set the home interface name.
 void setEJBPrimaryKeyName(java.lang.String ejbPrimaryKeyName)
          Set the primary key class name.
 void setEJBRemoteMethod(MethodDescriptor ejbRemoteMethod)
          Set the remote method to invoke.
 void setEJBRemoteName(java.lang.String ejbRemoteName)
          Set the remote interface name.
 void setId(java.lang.String id)
          Set the unique identifier.
 void setVerbose(boolean verbose)
          Set whether the invokeXXX() methods emit debugging messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EJBInvocationDescriptor

public EJBInvocationDescriptor()
Create a new EJB descriptor object.

EJBInvocationDescriptor

public EJBInvocationDescriptor(java.lang.String description,
                               EJBDescriptor beanDescriptor,
                               MethodDescriptor homeMethodDescriptor,
                               java.lang.String[] homeParmDescriptions,
                               MethodDescriptor remoteMethodDescriptor,
                               java.lang.String[] remoteParmDescriptions)
Create a new EJB descriptor object.
Parameters:
description - Human-readable bean description.
beanDescriptor - Meta-data describing the bean in question.
homeMethodDescriptor - Meta-data for home method to invoke.
homeParmDescriptions - Home method parameter descriptions.
remoteMethodDescriptor - Meta-data for remote method to invoke.
remoteParmDescriptions - Remote method parameter descriptions.
Method Detail

getId

public final java.lang.String getId()
Return the system-assigned unique identifier.
Returns:
The unique identifier.
See Also:
setId(java.lang.String)

setId

public void setId(java.lang.String id)
Set the unique identifier.
Parameters:
id - The unique identifier.
See Also:
getId()

set

public void set(java.lang.String description,
                EJBDescriptor beanDescriptor,
                MethodDescriptor homeMethodDescriptor,
                java.lang.String[] homeParmDescriptions,
                MethodDescriptor remoteMethodDescriptor,
                java.lang.String[] remoteParmDescriptions)
Set descriptor values.
Parameters:
description - Human-readable bean description.
beanDescriptor - Meta-data describing the bean in question.
homeMethodDescriptor - Meta-data for home method to invoke.
homeParmDescriptions - Home method parameter descriptions.
remoteMethodDescriptor - Meta-data for remote method to invoke.
remoteParmDescriptions - Remote method parameter descriptions.

setVerbose

public void setVerbose(boolean verbose)
Set whether the invokeXXX() methods emit debugging messages.
Parameters:
verbose - true to emit messages.
See Also:
isVerbose()

isVerbose

public boolean isVerbose()
Check whether the invokeXXX() methods emit debugging messages.
Returns:
true if the invokeXXX() methods emit debugging messages.
See Also:
setVerbose(boolean)

invoke

public java.lang.Object invoke(java.util.Properties environment,
                               java.lang.Object[] ejbHomeParameters,
                               java.lang.Object[] ejbRemoteParameters)
                        throws WorkflowException
Create a remote object reference; then, invoke a method on it. The implementation performs a JNDI lookup to obtain a reference to the home interface, and then calls the home method specified by this descriptor to create a remote object, passing the supplied parameter values. It then calls the remote method specified by this descriptor, passing the supplied parameter values. Parameter and return types match those declared for the home and remote methods, respectively, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
environment - Environment settings for initial JNDI context used to look up the home interface.
ejbHomeParameters - Actual parameter values for home method.
ejbRemoteParameters - Actual parameter values for remote method.
Returns:
The value returned by the invoked remote method.
Throws:
WorkflowException - if the specified home interface cannot be located, or if the actual home or remote method parameters do not match those specified in this descriptor in number and type, or if any parameter classes cannot be loaded, or if the specified home or remote method cannot be found, or if the home method call fails, or if any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if either of the invoked methods throws an exception.
See Also:
invokeHomeMethod(java.util.Properties, java.lang.Object[]), invokeRemoteMethod(java.lang.Object, java.lang.Object[])

invokeHomeMethod

public java.lang.Object invokeHomeMethod(java.util.Properties environment,
                                         java.lang.Object[] ejbHomeParameters)
                                  throws WorkflowException
Create a home object reference; then, invoke a method on it. The implementation performs a JNDI lookup to obtain a reference to the home interface, and then calls the home method specified by this descriptor to create a remote object, passing the supplied parameter values. Parameter and return types match those declared for the home method, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
environment - Environment settings for initial JNDI context used to look up the home interface.
ejbHomeParameters - Actual parameter values for home method.
Returns:
The remote object reference(s) returned by the invoked home method.
Throws:
WorkflowException - if the specified home interface cannot be located, or if the actual home method parameters do not match those specified in this descriptor in number and type, or if any parameter class cannot be loaded, or if the specified home method cannot be found, or if the home method call fails, or if any of the parameters are not instances of the corresponding classes (or subclasses thereof) specified by this descriptor, or if the invoked home methods throws an exception.
See Also:
invoke(java.util.Properties, java.lang.Object[], java.lang.Object[]), invokeRemoteMethod(java.lang.Object, java.lang.Object[])

invokeRemoteMethod

public java.lang.Object invokeRemoteMethod(java.lang.Object remoteObject,
                                           java.lang.Object[] ejbRemoteParameters)
                                    throws WorkflowException
Invoke a method on a remote object. The implementation calls the remote method specified by this descriptor, passing the supplied parameter values. Parameter and return types match those declared for the remote method, and primitive Java types are wrapped in a corresponding java.lang.* object (e.g., int is passed using a java.lang.Integer object, long using a java.lang.Long, etc.).
Parameters:
remoteObject - Remote object on which to invoke the method.
ejbRemoteParameters - Actual parameter values for remote method.
Returns:
The value returned by the invoked remote method.
Throws:
WorkflowException - if the actual remote method parameters do not match those specified in this descriptor in number and type, or if any parameter class cannot be loaded, or if the specified remote method cannot be found, or if any of the parameters are not instances of the corresponding classes (or a subclass thereof) specified by this descriptor, or if the invoked method throws an exception.
See Also:
invoke(java.util.Properties, java.lang.Object[], java.lang.Object[]), invokeHomeMethod(java.util.Properties, java.lang.Object[])

isFullyFormed

public boolean isFullyFormed()
Check whether this descriptor has all required values set.
Returns:
true if all required values are set.

getReturnTypeName

public java.lang.String getReturnTypeName()
Get the remote method return type.
Returns:
The fully qualified return type of the remote method.

getDescription

public final java.lang.String getDescription()
Return the human-readable bean description.
Returns:
The human-readable bean description.

getHomeParmsDescriptions

public final java.lang.String[] getHomeParmsDescriptions()
Return the parameter descriptions for the home method to invoke.
Returns:
Parameter descriptions for the home method to invoke.

getRemoteParmsDescriptions

public final java.lang.String[] getRemoteParmsDescriptions()
Return the parameter descriptions for the remote method to invoke.
Returns:
Parameter descriptions for the remote method to invoke.

setEJBDeploymentName

public void setEJBDeploymentName(java.lang.String deploymentName)
Set the EJB deployment name.
Parameters:
ejbDeploymentName - The name under which the EJB was deployed.
See Also:
getEJBDeploymentName()

getEJBDeploymentName

public java.lang.String getEJBDeploymentName()
Return the EJB deployment name.
Returns:
The name under which the EJB was deployed.
See Also:
setEJBDeploymentName(java.lang.String)

setEJBHomeName

public void setEJBHomeName(java.lang.String ejbHomeName)
Set the home interface name.
Parameters:
ejbHomeName - The fully qualified name of the EJB's home interface.
See Also:
getEJBHomeName()

getEJBHomeName

public java.lang.String getEJBHomeName()
Return the home interface name.
Returns:
The fully qualified name of the EJB's home interface.
See Also:
setEJBHomeName(java.lang.String)

setEJBPrimaryKeyName

public void setEJBPrimaryKeyName(java.lang.String ejbPrimaryKeyName)
Set the primary key class name.
Parameters:
ejbPrimaryKeyName - The fully qualified name of the EJB's primary key class.
See Also:
getEJBPrimaryKeyName()

getEJBPrimaryKeyName

public java.lang.String getEJBPrimaryKeyName()
Return the primary key class name.
Returns:
The fully qualified name of the EJB's primary key class.
See Also:
setEJBPrimaryKeyName(java.lang.String)

setEJBHomeMethod

public void setEJBHomeMethod(MethodDescriptor ejbHomeMethod)
Set the home method to invoke.
Parameters:
ejbHomeMethod - Descriptor for the home method to invoke.
See Also:
getEJBHomeMethod()

getEJBHomeMethod

public MethodDescriptor getEJBHomeMethod()
Return the home method to invoke.
Returns:
Descriptor for the home method to invoke.
See Also:
setEJBHomeMethod(com.bea.wlpi.common.MethodDescriptor)

setEJBRemoteName

public void setEJBRemoteName(java.lang.String ejbRemoteName)
Set the remote interface name.
Parameters:
ejbRemoteName - The fully qualified name of the EJB's remote interface.
See Also:
getEJBRemoteName()

getEJBRemoteName

public java.lang.String getEJBRemoteName()
Return the remote interface name.
Returns:
The fully qualified name of the EJB's remote interface.
See Also:
setEJBRemoteName(java.lang.String)

setEJBRemoteMethod

public void setEJBRemoteMethod(MethodDescriptor ejbRemoteMethod)
Set the remote method to invoke.
Parameters:
ejbRemoteName - Descriptor for the remote method to invoke.
See Also:
getEJBRemoteMethod()

getEJBRemoteMethod

public MethodDescriptor getEJBRemoteMethod()
Return the remote method to invoke.
Returns:
Descriptor for the remote method to invoke.
See Also:
setEJBRemoteMethod(com.bea.wlpi.common.MethodDescriptor)

WebLogic Process Integrator Version 1.1

WebLogic and Process Integrator are trademarks of BEA Systems, Inc.
Copyright (c) 2000 BEA Systems, Inc., 8920 Woodbine Avenue, Suite 400,
Markham, Ontario L3R 9W9 Canada. All rights reserved.