WebLogic Integration


com.bea.wlai.client
Interface ApplicationViewRemote


public interface ApplicationViewRemote
extends javax.ejb.EJBObject

The remote interface for the ApplicationView EJB. It represents a STATELESS session EJB. This interface is used internally by the ApplicationView object. It is recommended that clients use the ApplicationView object instead of this remote interface. The ApplicationView provides for adding event listeners, and easier use of async invocation of services (this interface does not provide these facilities).

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.
See Also:
ApplicationView

Method Summary
 IEventDefinition getEventDefinition(QualifiedName appViewName, java.lang.String eventType)
          Get IEventDefinition for the given event type.
 IDocumentDefinition getRequestDocumentDefinition(QualifiedName appViewName, java.lang.String serviceName)
          Get request DocumentDefinition for the given service.
 IDocumentDefinition getResponseDocumentDefinition(QualifiedName appViewName, java.lang.String serviceName)
          Get response IDocumentDefinition for the given service.
 IDocument invokeService(QualifiedName appViewName, java.lang.String serviceName, IDocument request, boolean autoCreateResponse, javax.resource.cci.ConnectionSpec spec)
          Synchronously invoke the service with the given name, using the request document given.
 IDocument invokeService(QualifiedName appViewName, java.lang.String serviceName, IDocument request, javax.resource.cci.ConnectionSpec spec)
          Synchronously invoke the service with the given name, using the request document given.
 void invokeService(QualifiedName appViewName, java.lang.String serviceName, IDocument request, IDocument response, javax.resource.cci.ConnectionSpec spec)
          Synchronously invoke the service with the given name, using the request and response documents given.
 java.lang.String invokeServiceAsync(QualifiedName appViewName, java.lang.String appViewInstanceID, java.lang.String serviceName, IDocument request, javax.resource.cci.ConnectionSpec spec)
          Asynchronously invoke the service with the given name, and post the the response to the JMS response queue for this ApplicationView.
 java.lang.String invokeServiceAsync(QualifiedName appViewName, java.lang.String appViewInstanceID, java.lang.String serviceName, IDocument request, java.lang.String responseQueueJNDIName, java.util.Map jmsPropertyMap, javax.resource.cci.ConnectionSpec spec)
          Asynchronously invoke the service with the given name, and place the response on the indicated JMS queue when the response is available.
 boolean isAsyncEnabled(QualifiedName appViewName)
          Determine if this application view has been set up to allow the user to use the invokeServiceAsync() method.
 java.lang.String[] listEventTypes(QualifiedName appViewName)
          List the events this ApplicationView is capable of delivering, and thus the events which may be listened for using an EventContext returned from a call to getEventContext().
 java.lang.String[] listServiceNames(QualifiedName appViewName)
          List service names deployed for this ApplicationView.
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

listServiceNames

public java.lang.String[] listServiceNames(QualifiedName appViewName)
                                    throws ApplicationViewException,
                                           java.rmi.RemoteException
List service names deployed for this ApplicationView.

Throws:
ApplicationViewException - If the appViewName or needed ApplicationView metadata cannot be found.
java.rmi.RemoteException - If an RMI communication failure occurs.

listEventTypes

public java.lang.String[] listEventTypes(QualifiedName appViewName)
                                  throws ApplicationViewException,
                                         java.rmi.RemoteException
List the events this ApplicationView is capable of delivering, and thus the events which may be listened for using an EventContext returned from a call to getEventContext().

Throws:
ApplicationViewException - If the appViewName or needed ApplicationView metadata cannot be found.
java.rmi.RemoteException - If an RMI communication failure occurs.

getRequestDocumentDefinition

public IDocumentDefinition getRequestDocumentDefinition(QualifiedName appViewName,
                                                        java.lang.String serviceName)
                                                 throws ApplicationViewException,
                                                        java.rmi.RemoteException
Get request DocumentDefinition for the given service. If the schema for the document type cannot be found, null is returned.

Throws:
ApplicationViewException - If the schema repository cannot be found; the attempt to transport or manipulate the document type's schema fails; the document type's schema text, as stored in the schema repository, cannot be parsed; there is a read error while reading the document type's schema; the lookup of the document type fails; the creation of a SchemaManager remote interface fails; or the serviceName is not defined for this ApplicationView.
java.rmi.RemoteException - If an RMI communication failure occurs.

getResponseDocumentDefinition

public IDocumentDefinition getResponseDocumentDefinition(QualifiedName appViewName,
                                                         java.lang.String serviceName)
                                                  throws ApplicationViewException,
                                                         java.rmi.RemoteException
Get response IDocumentDefinition for the given service. If the schema for the document type cannot be found, null is returned.

Throws:
ApplicationViewException - If the schema repository cannot be found; the attempt to transport or manipulate the document type's schema fails; the document type's schema text, as stored in the schema repository, cannot be parsed; there is a read error while reading the document type's schema; the lookup of the document type fails; the creation of a SchemaManager remote interface fails; or the serviceName is not defined for this ApplicationView.
java.rmi.RemoteException - If an RMI communication failure occurs.

getEventDefinition

public IEventDefinition getEventDefinition(QualifiedName appViewName,
                                           java.lang.String eventType)
                                    throws ApplicationViewException,
                                           java.rmi.RemoteException
Get IEventDefinition for the given event type. If the schema for the event type cannot be found, null is returned.

Throws:
ApplicationViewException - If the schema repository cannot be found; the attempt to transport or manipulate the event type's schema fails; the event type's schema text, as stored in the schema repository, cannot be parsed; or there is a read error while reading the event type's schema.
java.rmi.RemoteException - If an RMI communication failure occurs.

invokeService

public IDocument invokeService(QualifiedName appViewName,
                               java.lang.String serviceName,
                               IDocument request,
                               javax.resource.cci.ConnectionSpec spec)
                        throws ApplicationViewException,
                               DocumentException,
                               javax.resource.ResourceException,
                               java.rmi.RemoteException
Synchronously invoke the service with the given name, using the request document given. This method is equivalent to calling invokeService(String, IDocument, boolean) with autoCreateResponse false.

Throws:
ApplicationViewException - If the service or other resources needed by this method cannot be found in the metadata for this ApplicationView.
DocumentException - If there is an error processing the request or response document.
javax.resource.ResourceException - If there is an error obtaining a connection from the connection factory, or there is some other adapter related error.
java.rmi.RemoteException - If an RMI communication failure occurs.

invokeService

public IDocument invokeService(QualifiedName appViewName,
                               java.lang.String serviceName,
                               IDocument request,
                               boolean autoCreateResponse,
                               javax.resource.cci.ConnectionSpec spec)
                        throws ApplicationViewException,
                               DocumentException,
                               javax.resource.ResourceException,
                               java.rmi.RemoteException
Synchronously invoke the service with the given name, using the request document given. If autoCreateResponse is true, this method will attempt to create a default document according to the response document definition, if possible, and pass this to the underlying Interaction. If auto creation fails, the Interaction is allowed to create the response on its own.

Throws:
ApplicationViewException - If the service or other resources needed by this method cannot be found in the metadata for this ApplicationView.
DocumentException - If there is an error processing the request or response document.
javax.resource.ResourceException - If there is an error obtaining a connection from the connection factory, or there is some other adapter related error.
java.rmi.RemoteException - If an RMI communication failure occurs.

invokeService

public void invokeService(QualifiedName appViewName,
                          java.lang.String serviceName,
                          IDocument request,
                          IDocument response,
                          javax.resource.cci.ConnectionSpec spec)
                   throws ApplicationViewException,
                          DocumentException,
                          javax.resource.ResourceException,
                          java.rmi.RemoteException
Synchronously invoke the service with the given name, using the request and response documents given. This method may be useful if the response document is expensive to create, and you wish to reuse it for subsequent calls to this method.

Throws:
ApplicationViewException - If the service or other resources needed by this method cannot be found in the metadata for this ApplicationView.
DocumentException - If there is an error processing the request or response document.
javax.resource.ResourceException - If there is an error obtaining a connection from the connection factory, or there is some other adapter related error.
java.rmi.RemoteException - If an RMI communication failure occurs.

isAsyncEnabled

public boolean isAsyncEnabled(QualifiedName appViewName)
                       throws java.rmi.RemoteException
Determine if this application view has been set up to allow the user to use the invokeServiceAsync() method. This value may be controlled by setting the value of the asycEnabled attribute in the application view deployment descriptor.

Throws:
java.rmi.RemoteException - If an RMI communication failure occurs.

invokeServiceAsync

public java.lang.String invokeServiceAsync(QualifiedName appViewName,
                                           java.lang.String appViewInstanceID,
                                           java.lang.String serviceName,
                                           IDocument request,
                                           javax.resource.cci.ConnectionSpec spec)
                                    throws ApplicationViewException,
                                           java.rmi.RemoteException
Asynchronously invoke the service with the given name, and post the the response to the JMS response queue for this ApplicationView. The caller is responsible for retrieving the response from the response queue. The return value is the ID assigned to this invocation request by the server and is used as the JMS correlation ID. The response message is an ObjectMessage containing an AsyncServiceResponse object which contains the request ID, response document, and other information. The appViewInstanceID field identifies the application view instance object which made the request, and is placed into a JMS header field in the response message to allow the app view instance object to filter out just its own responses.
If errors occur during the processing of an asyncronous service request, the error message is stored into the AsyncServiceResponse object. Users should check the hasError() method of the response to determine if an error has occurred before attempting to process the response document.
The request document should conform to the document definition given by getRequestDocumentDefinition. The response document will conform to the document definition given by getResponseDocumentDefinition.

Throws:
ApplicationViewException - if async messaging couldn't be initialized, or request/response async message queues couldn't be found.
java.rmi.RemoteException - If an RMI communication failure occurs.
See Also:
getRequestDocumentDefinition(QualifiedName,String), getResponseDocumentDefinition(QualifiedName,String), AsyncServiceResponse

invokeServiceAsync

public java.lang.String invokeServiceAsync(QualifiedName appViewName,
                                           java.lang.String appViewInstanceID,
                                           java.lang.String serviceName,
                                           IDocument request,
                                           java.lang.String responseQueueJNDIName,
                                           java.util.Map jmsPropertyMap,
                                           javax.resource.cci.ConnectionSpec spec)
                                    throws ApplicationViewException,
                                           java.rmi.RemoteException
Asynchronously invoke the service with the given name, and place the response on the indicated JMS queue when the response is available. The return value is the ID assigned to this invocation request by the server. The given JMS queue will be receive a message when the response is available, and will receive a AsyncServiceResponse object containing the request ID, response document, and other information.

Optionally, the caller can provide a map of JMS property name/value pairs. The name/value pairs must use a String for both name and value. This method will set the desired JMS properties into the async service response message that is posted to the response queue. If this feature is not required, pass jmsPropertyMap null.

The appViewInstanceID field identifies the application view instance object which made the request, and is placed into a JMS header field in the response message to allow the app view instance object to filter out just its own responses.

If errors occur during the processing of an asyncronous service request, the error message is stored into the AsyncServiceResponse object. Users should check the hasError() method of the response to determine if an error has occurred before attempting to process the response document.

The request document should conform to the document definition given by getRequestDocumentDefinition. The response document will conform to the document definition given by getResponseDocumentDefinition.

Throws:
ApplicationViewException - if async messaging couldn't be initialized, or request/response async message queues couldn't be found.
java.rmi.RemoteException - If an RMI communication failure occurs.
See Also:
getRequestDocumentDefinition(QualifiedName,String), getResponseDocumentDefinition(QualifiedName,String), AsyncServiceResponse

WebLogic Integration

WebLogic Integration (WLI)