WebLogic Integration


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, Publishable, java.lang.Comparable

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.

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
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.
EJBInvocationDescriptor(java.lang.String description, EJBDescriptor beanDescriptor, MethodDescriptor homeMethodDescriptor, java.lang.String[] homeParmDescriptions, MethodDescriptor remoteMethodDescriptor, java.lang.String[] remoteParmDescriptions, boolean published)
          Create a new EJB descriptor object.
 
Method Summary
 java.lang.Object clone()
          clone an EJBInvocationDescriptor object.
 int compareTo(java.lang.Object o)
           
 java.lang.Object getContents()
           
 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 getEntryName()
           
 java.lang.String[] getHomeParamDescriptions()
          get the EJB home parameter descriptions
 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 getOwnerName()
           
 java.util.List getReferencedPublishables(java.util.Map publishables)
           
 java.lang.String[] getRemoteParamDescriptions()
          get the EJB remote parameter descriptions
 java.lang.String[] getRemoteParmsDescriptions()
          Return the parameter descriptions for the remote method to invoke.
 java.lang.String getReturnTypeName()
          Get the remote method return type.
 int getType()
           
 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 isPublished()
           
 boolean isSessionEJB()
          Return true if the contained bean is a Session EJB
 boolean isVerbose()
          Check whether the invokeXXX() methods emit debugging messages.
 void publish()
           
 void set(java.lang.String description, EJBDescriptor beanDescriptor, MethodDescriptor homeMethodDescriptor, java.lang.String[] homeParmDescriptions, MethodDescriptor remoteMethodDescriptor, java.lang.String[] remoteParmDescriptions)
          Set descriptor values.
 void set(java.lang.String description, EJBDescriptor beanDescriptor, MethodDescriptor homeMethodDescriptor, java.lang.String[] homeParmDescriptions, MethodDescriptor remoteMethodDescriptor, java.lang.String[] remoteParmDescriptions, boolean published)
          Set descriptor values.
 void setDescription(java.lang.String description)
          Set the description.
 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 setHomeParamDescriptions(java.lang.String[] homeParamDescriptions)
          Set the EJB home parameter descriptions
 void setId(java.lang.String id)
          Set the unique identifier.
 void setIsSessionBean(boolean isSessionBean)
           
 void setPublished()
          Deprecated. Call publish() instead.
 void setRemoteParamDescriptions(java.lang.String[] remoteParamDescriptions)
          Set the EJB remote parameter descriptions
 void setVerbose(boolean verbose)
          Set whether the invokeXXX() methods emit debugging messages.
 
Methods inherited from class java.lang.Object
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.

EJBInvocationDescriptor

public EJBInvocationDescriptor(java.lang.String description,
                               EJBDescriptor beanDescriptor,
                               MethodDescriptor homeMethodDescriptor,
                               java.lang.String[] homeParmDescriptions,
                               MethodDescriptor remoteMethodDescriptor,
                               java.lang.String[] remoteParmDescriptions,
                               boolean published)
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.
Since:
WebLogic Process Integrator 2.0
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()

setDescription

public void setDescription(java.lang.String description)
Set the description.

Parameters:
description - The description.
See Also:
getDescription()

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.

set

public void set(java.lang.String description,
                EJBDescriptor beanDescriptor,
                MethodDescriptor homeMethodDescriptor,
                java.lang.String[] homeParmDescriptions,
                MethodDescriptor remoteMethodDescriptor,
                java.lang.String[] remoteParmDescriptions,
                boolean published)
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.
Since:
WebLogic Process Integrator 2.0

clone

public java.lang.Object clone()
clone an EJBInvocationDescriptor object.

Returns:
an clone instance of EJBInvocationDescriptor.
Overrides:
clone in class java.lang.Object
Since:
WebLogic Process Integrator 2.0

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)

isPublished

public boolean isPublished()
Specified by:
isPublished in interface Publishable

Since:
WebLogic Process Integrator 2.0

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.

isSessionEJB

public boolean isSessionEJB()
Return true if the contained bean is a Session EJB

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)

setHomeParamDescriptions

public void setHomeParamDescriptions(java.lang.String[] homeParamDescriptions)
Set the EJB home parameter descriptions

Parameters:
homeParamDescriptions - the EJB home parameter descrptions.
See Also:
getHomeParamDescriptions()

getHomeParamDescriptions

public java.lang.String[] getHomeParamDescriptions()
get the EJB home parameter descriptions

Returns:
the EJB home parameter descrptions.
See Also:
setHomeParamDescriptions(java.lang.String[])

setRemoteParamDescriptions

public void setRemoteParamDescriptions(java.lang.String[] remoteParamDescriptions)
Set the EJB remote parameter descriptions

Parameters:
remoteParamDescriptions - the EJB home parameter descrptions.
See Also:
getRemoteParamDescriptions()

getRemoteParamDescriptions

public java.lang.String[] getRemoteParamDescriptions()
get the EJB remote parameter descriptions

Returns:
the EJB home parameter descrptions.
See Also:
setRemoteParamDescriptions(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)

setIsSessionBean

public void setIsSessionBean(boolean isSessionBean)


compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable


setPublished

public void setPublished()
Deprecated. Call publish() instead.


publish

public void publish()
Specified by:
publish in interface Publishable


getContents

public java.lang.Object getContents()
Specified by:
getContents in interface Publishable


getEntryName

public java.lang.String getEntryName()
Specified by:
getEntryName in interface Publishable


getType

public int getType()
Specified by:
getType in interface Publishable


getOwnerName

public java.lang.String getOwnerName()
Specified by:
getOwnerName in interface Publishable


getReferencedPublishables

public java.util.List getReferencedPublishables(java.util.Map publishables)
Specified by:
getReferencedPublishables in interface Publishable


WebLogic Integration

WebLogic Integration (WLI)