Chapter 3 EAServer and Application Issues
When the Component Builder deploys a component into EAServer, a new component is created in the specified EAServer package using the EAServer Java component model. The new component's interface (its methods and their arguments) is described using CORBA IDL.
Application Integrator components are designed to take advantage of the EAServer instance pooling feature.
When a client executes methods on a proxy object for an Application Integrator component, EAServer creates a new instance of a component if the instance pool does not contain any instances available for reuse. If an unused instance already exists in the pool, EAServer can initialize that instance by calling the activate method and allowing a client application to call a method on the component. During component instantiation, a one-time initialization routine retrieves component property information.
EAServer activates an Application Integrator component instance as a result of a client method invocation request. When activated, the component attempts to connect to its target server using the connection properties that you deployed along with the component. Depending on its configuration, the component can obtain its connection from a connection cache defined in EAServer, or it can open a connection directly to the server.
If an exception occurs during component activation, the exception information is held and returned on the first method call to that instance. The most common reasons for exceptions during component activation result from problems connecting to the server, such as invalid security values, the server being unavailable, and invalid connection properties.
The method's input parameters (parameters defined with the modes in or inout) are passed to the target stored procedure. After the procedure executes, any result sets are returned to the caller as the return value of the method call, and any output parameters (parameters defined as inout or out) are returned to the caller.
EAServer deactivates each Application Integrator component instance when it no longer needs to keep that instance associated with the client that caused its activation. During instance deactivation, the connection that was obtained during instance activation is returned to the pool.
EAServer destroys pooled component instances in any of the following circumstances:
Application Integrator components can be accessed from the Jaguar Methods as Stored Procedures interface (MASP), but there are some restrictions on method names. MASP does not allow the following method names:
Components must have different names than their Java package names. When a component's name and Java package are the same, deployment to EAServer fails. For example, when deploying a component named Pubs2 with Java package Pubs2, you receive an error message similar to the following when the component is deployed:
Defining interface IDL for Pubs2::Pubs2 in IDL module Pubs2. Failed to define component: com.sybase.CORBA.idl.SyntaxError:file 'D:\Program Files\Sybase\Jaguar CTS 3.5\Repository\Pubs2.tmp', line 10: 'Pubs2': identifier is illegal in scope Pubs2.
When you encounter this message, change the component name or Java package, and redeploy the component.
If you turn off (uncheck) the "Automatic demarcation / deactivation" property on the "Transactions" tab of an AI component's properties in Jaguar Manager (com.sybase.jaguar.component.tx_vote = true), the component becomes "stateful". In this case, the component's methods do not implicitly call the EAServer transaction primitives to force the component to be deactivated, therefore, any client programs or other EAServer components calling methods in an AI component configured this way should eventally call the component's completeWork() or rollbackWork() method to force deactivation of the AI component. Failure to do so may prevent component instances, backend connections, and other resources from being freed in a timely manner, resulting in applications that exhibit unwanted behavior such as failure to scale properly, resource leaking, and locking.
If the deployment wizard fails to access the EAServer component that handles deployment of Application Integrator components (SybAi/Integrator), the message "Failed to get Integrator" displays. The SybAi/Integrator component is installed in EAServer automatically the first time you run the deployment wizard. When the "Failed to get Integrator" message displays, it is usually because the Application Integrator runtime classes are not installed in EAServer, or because you have recently reinstalled EAServer over an existing EAServer installation.
If you receive this message, verify that the Application Integrator runtime classes are installed in EAServer. The runtime classes should be in the EASERVER_HOME\java\classes directory in the package com.sybase.ai. If the runtime classes are not installed, copy them from Application Integrator 3.5\runtime\classes to your EASERVER_HOME\java\classes directory. When Application Integrator is installed on the same machine as EAServer, the runtime classes are installed to the EASERVER_HOME\java\classes directory automatically.
If you have recently reinstalled EAServer over an existing EAServer installation, reinstall the SybAi package. To reinstall the SybAi package from Jaguar Manager:
Application Integrator components do not forward SQLWarnings raised when stored procedures are invoked. If your JDBC driver raises SQLWarnings when a stored procedure is invoked, these warnings are silently ignored. SQLExceptions raised by the JDBC driver are caught and handled. When a SQLException is caught, it is written to the EAServer log, wrapped in an AIUserException, and thrown back to the client.
Copyright © 2001 Sybase, Inc. All rights reserved. |
![]() |