![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
SAP Connect User's Guide
CHAPTER 2
Novell exteNd Composer SAP Connect is designed specifically to integrate with the SAP environment through the SAP JCo (Java Connector) libraries. Please see the exteNd Composer SAP Connect Release Notes for specific software version support info. You should obtain the appropriate (currently supported) version of the
Registered SAP users may download SAP JCo libraries from the following SAP site: http://service.sap.com. A valid SAP Service Marketplace user ID and password is required to access this SAP site.
NOTE: To install exteNd Composer SAP Connect, you must have SAP's JCo libraries installed. See discussion below.
If you do not have SAP Java Connector installed (as described below) prior to installing Composer SAP Connect, the following dialog will be displayed.
Also, the log will have at least some of the following messages:
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$PoolChangedListener
java.lang.NoClassDefFoundError: com/sap/mw/jco/JCO$ServerStateChangedListener
Enabler: SAP; Error: Cannot get build for: com.sssw.b2b.ee.sap.rt.GNVSAPXObjectFactory
Enabler: SAPService; Error: Cannot get build for: com.sssw.b2b.ee.sap.rt.GNVSAPServiceXObjectFactory
SAP Connect will not load if the ENABLER_LICENSE element in xconfig.xml is not set to "true." On the design-time machine, look for xconfig.xml under the \Composer\Designer\bin directory. On the server-side, look in App Server\Composer\lib.
Open xconfig.xml in a teswt editor. Look for the <COMPONENT_FACTORY> entries for SAP and SAPService. Set the ENABLER_LICENSE element within each of these to "true":
<ENABLER_LICENSE enabled="true">
Then Save the modified file and restart Composer or the server, as applicable.
NOTE: Do not edit xconfig.xml while Composer is running. Composer overwrites its config file at shutdown. If you have made edits while Composer is running, they will be lost as soon as you exit Composer. Always stop Composer, then edit xconfig.xml, then restart Composer.
For exteNd Composer SAP Connect design-time installation, follow SAP's instructions for installing JCO libraries on Windows 2000/XP as appropriate. Here is what you need to do to get started:
From the SAP website, download jco-ntintel-1.1.04.zip into an arbitrary directory {jco-install-path}.
Unzip the file jco-ntintel-1.1.04.zip into an arbitrary directory {jco-install-path}.
Add the DLLs to the extend5\Composer\Designer\bin directory.
Add sapjco.jar to the exteNd5\Composer\Designer\lib directory.
Add a <JAR> entry for sapjco.jar to the SAP section of xconfig.xml (which is in the \Composer\Designer\bin directory). For example:
<JAR>..\lib\jCO.jar</JAR>
For exteNd Composer SAP Connect on Composer Enterprise Server, follow SAP's instructions for installing JCO on Windows 2000:
From the SAP site, download jco-ntintel-1.1.04.zip into an arbitrary directory {jco-install-path}.
Unzip the file jco-ntintel-1.1.04.zip into an arbitrary directory {jco-install-path}.
Add the DLLs to a location within the application server directory tree that is in the path so that they can be found at runtime. For example, the application server bin directory.
Add jCO.jar to the Server's exteNd5\Composer\Designer\lib directory.
Add [PATH]\exteNd5\Composer\Designer\lib\jCO.jar to the application server's CLASSPATH
For exteNd Composer SAP Connect Server, follow SAP's instructions for installing JCO on Solaris.
From the SAP site, download jco-sun-1.1.04.tgz or jco-sun-1.1.04.tar.z (or appropriate version; see SAP Connect Release Notes) into an arbitrary directory {jco-install-path}.
Expand the jco-sun-1.1.04.tgz or jco-sun-1.1.04.tar.z into an arbitrary directory {jco-install-path}.
Add the SOs to a location with the application server directory tree that is in the LD_LIBRARY_PATH sot that they can be found at runtime.
Add jCO.jar to the Server's exteNd5\Composer\Designer\lib directory.
Add [PATH]\exteNd5\Composer\Designer\lib\jCO.jar to your CLASSPATH environment variable.
For exteNd Composer SAP Connect Server, follow SAP's instructions for installing JCO on AIX.
From the SAP site, download jco-rs6000-1.1.04.tgz or jco-rs6000-1.1.04.tar.z into an arbitrary directory {jco-install-path}.
Expand the jco-rs6000-1.1.04.tgz or jco-rs6000-1.1.04.tar.z into an arbitrary directory {jco-install-path}.
Add The SOs to a location with the application server directory tree that is in the LIBPATH sot that they can be found at runtime.
Add [PATH]\exteNd5\Composer\lib\jCO.jar to your CLASSPATH environment variable.
For exteNd Composer SAP Connect Server, follow SAP's instructions for installing JCO on HP-UX.
From the SAP site, download jco-hp_32-1.1.04.tgz or jco-hp_32-1.1.04.tar.z into an arbitrary directory {jco-install-path}.
Expand the jco-hp_32-1.1.04.tgz or jco-hp_32-1.1.04.tar.z into an arbitrary directory {jco-install-path}.
Add The SLs to a location with the application server directory tree that is in the SHLIB_PATH sot that they can be found at runtime.
Add [PATH]\exteNd5\Composer\lib\jCO.jar to your CLASSPATH environment variable.
Before you create an SAP Component, you will find it necessary to create a Connection Resource to access the SAP system.
Each Connector, including SAP Connect, uses its own Connection Resource type. The Connection Resources (for JDBC, 3270, 5250, CICS RPC, JMS, HTML, Telnet, EDI, etc.) require various types of parameters, appropriate to the external data source being connected. The appearance of the setup wizard changes dynamically to reflect the type of Connection Resource that is selected.
Once you create a Connection Resource, you can reuse it for multiple SAP components that you create, rather than creating a new connection each time. Also, a Connection Resource, once created, can to some degree be self-configuring in that its data fields can be linked to ECMAScript expressions that control the parameter values associated with the connection (see below).
There are two types of SAP Connectors: the standard SAP Connection and the SAP Service Connection. Steps for creating both types will be described below.
You can specify Connection parameter values in one of two ways: as Constants or as Expressions. A constant based parameter uses the value you type in the Connection dialog every time the Connection is used. An expression based parameter allows you to set the value using a programmatic expression, which can result in a different value each time the connection is used at runtime. This allows the Connection's behavior to be flexible and vary based on runtime conditions each time it is used.
For instance, one very simple use of an expression driven parameter in a SAP Connection would be to define the User ID and Password as PROJECT Variables (e.g. PROJECT.XPATH("USERCONFIG/MyDeployUser"). This way when you deploy the project, you can update the PROJECT Variables in the Deployment Wizard to values appropriate for the final deployment environment. At the other extreme, you could have a custom script that queries a Java business object in the Application Server to determine what User ID and Password to use.
To switch a parameter from Constant driven to Expression driven:
Click the right mouse button in the parameter field you are interested in changing.
Select Expression from the context menu and the editor button will appear or become enabled.
Click on the button and then create an expression that evaluates to a valid parameter value at runtime.
To create a standard SAP Connection resource:
Select File>New>xObject, then open the Resource tab and select Connection. The "Create a New Connection Resource" Wizard appears.
Select SAP Connection from the Connection Type pull down menu.
Enter the SAP Language, for example EN are the letters for English.
Enter a valid Connection User ID to sign on to the selected database.
Enter a valid Connection Password for the selected database.
Select a Connection Pooling option. In the the dropdown list, choose from Non-Pooled, Session or Pooled from the dropdown box.
Selecting Non-Pooled means a connection will be created on request.
Selecting Session means the connection is provided by the Session Connection Manager.
Selecting Pooled means the connection is provided by the Pool Manager
Selecting either the Pooled or Session option for Connection Pooling will enable the Advanced... button.
If you request a Pooled connection from a connection component by clicking on Test, the connection is retrieved and released from the Connection Pool Manager, and then the pool is deleted. If you request a Pooled connection from an SAP component by clicking on Test or the component requests the connection, the connection is retrieved and released from the Connection Pool Manager, however the pool will not be deleted.
If you request a Session connection from a connection component by clicking on Test, the connection is retrieved and released to the Session Connection Manager, and then the session connection is deleted. If you request a Session connection from an SAP component by clicking on Test or the component requests the connection the connection is retrieved and released from the Session Pool Manager, however the Session Connection Manager will not be deleted.
Check the Default checkbox if you would like to use the current connection as the default connection for any new SAP Components you create in your project.
Click Test to see if your connection is successful. A "success" or "failure" message appears for your connection. You can continue creating the resource, even if your connection fails.
Click Finish. The newly-created resource connection object appears in the Composer Connection Resource detail pane.
An SAP Service is an event listener that registers with an SAP gateway server. When an RFC is executed on the SAP server the results are forwarded to the listener. The listener can then call other RFCs on the SAP Gateway Server using the connection established to register the listener and execute any other valid actions within its action model.
To create an SAP Service Connection resource:
Select File>New>xObject, then open the Resource tab and select Connection. The "Create a New Connection Resource" Wizard appears.
Select SAP Service Connection from the Connection Type pull down menu.
Enter the SAP Language, for example EN are the letters for English.
Enter a valid Connection User ID to sign on to the selected database.
Enter a valid Connection Password for the selected database.
Select a Connection Pooling option. In the the dropdown list, choose from Non-Pooled, Session or Pooled from the dropdown box.
Selecting Non-Pooled means a connection will be created on request.
Selecting Session means the connection is provided by the Session Connection Manager.
Selecting Pooled means the connection is provided by the Pool Manager
Selecting either the Pooled or Session option for Connection Pooling will enable the Advanced... button.
If you request a Pooled connection from a connection component by clicking on Test, the connection is retrieved and released from the Connection Pool Manager, and then the pool is deleted. If you request a Pooled connection from an SAP component by clicking on Test or the component requests the connection, the connection is retrieved and released from the Connection Pool Manager, however the pool will not be deleted.
If you request a Session connection from a connection component by clicking on Test, the connection is retrieved and released to the Session Connection Manager, and then the session connection is deleted. If you request a Session connection from an SAP component by clicking on Test or the component requests the connection the connection is retrieved and released from the Session Pool Manager, however the Session Connection Manager will not be deleted.
Check the Default checkbox if you would like to use the current connection as the default connection for any new SAP Components you create in your project.
Click Test to see if your connection is successful. A "success" or "failure" message appears for your connection. You can continue creating the resource, even if your connection fails.
Click Finish. The newly-created resource connection object appears in the Composer Connection Resource detail pane.
Composer SAP Connect provides support for both Connection Pool Management and Session Connection Management.
Connection Pool Management provides access to a pool of connections via the JCo library using the JCo Pool Manager.
Session Connection Management provides a connection that persists the duration of an HTTP session to which it is linked.
Both Session Connection Management and Connection Pool Management are active in both Composer SAP Connect Designer and Composer SAP Connect Server.
Session Connection Management helps performance when you want to make multiple server requests with a server specified time frame (server request timeout). The connection is maintained based on the server http request. The connection is available from the sesssion connection manager as long as the session remains alive. When the session times out, the session connection manager is removed.
For an SAP Connection with Session Connection Pooling, a session connection manager and a session connection will be created the first time a component using the connection executes.
When Session Connection Pooling is selected for an SAP Connection Resource, the Advanced button will display the Session Info dialog. The Session Info dialog allows you to set Keep Alive and Inactivity Lifetime options for a managed session connection.
Keep Alive: (default 5) - is the delay period between checks to see if the connection is still alive. After this period Composer will ping the SAP system to keep the connection open - or alive.
Inactivity Lifetime: (default 60) - is the timeout period in minutes that overrides the HTTP session timeout. This is the time limit for an idle connection.
In the SAP Connection dialog, when you specify Pooled as the Server Connection Source for the SAP Connection, a pool using the JCo Pool Manager will be created via the connection pool manager the first time a component using the connection executes or when a user pre-initializes the pool from the SAP Console.
When
Pooling is selected as the Connection Pooling option for an SAP Connection Resource, the Advanced button will display the Pool Info dialog. The Pool Info dialog allows you to set the maximum initial pool size of the connection pool.
SAP Connection Pools can by managed through the SAP Console Screen.
If you are using the Novell exteNd Application Server, log on to your Server via your web browser using http://localhost/SilverMaster50 (or whatever is appropriate for the version in use). In this example, Novell exteNd App Server 5.0 is used.
NOTE: If you are not using the exteNd app server, enter a URL of this form:
Click on the exteNd Composer link. You should see the main console page:
Click on the SAP link in the left (nav) frame and the SAP Console General Properties Screen will come into view.
Click the Console button. A browser popup window (the T27 Connection Pool Management Screen) should appear:
The SAP Console provides the following information and interaction for managing connection pools.
In Use - is the number of connections in the pool that are currently allocated to applications
Max Used - is the peak number of connections that have been used
Available - is the number of connections in the pool that are currently free
Pool Size - is the maximum size of the pool. This field can be edited when resetting the Pool. To do so, enter the new pool size and press apply.
NOTE: Pool connections In Use will always be one more than required by the application because one pool connection is required for connection to the repository.
You may refresh the displayed pool information by pressing the Refresh Console button.
If you attempt to resize the pool and the connections are in use, the following SAP Console page will be displayed. You may press the Retry button to attempt to resize the pool again. You may also press the Kill button to forcibly resize the pool. This will close any open connections, delete the pool, and recreate it with the specified size. You may navigate back to the main SAP Console by pressing the Return button.
You may refresh the displayed pool information by pressing the Refresh button.
By default, the following SAP Console will be displayed when Pooling is not used.
If a component requests a connection and the pool is exhausted the request will timeout after 30 seconds and then an exception will be thrown.
In designer you can delete a pool by editing the connection that defines the pool and testing the connection. You can also delete a connection pool by editing a connection and pressing Finish. In either case, the pool will be forcefully deleted pool.
Pools created via component execution will have a Pool Size using the pool size set in the Pool Info dialog.
In addition to a connection resource, an SAP component also requires that you have already created XML templates so that you have sample documents for designing your component. (See Chapter 5, Creating XML Templates, in the Composer User's Guide for more information.)
Also, if your component design calls for any other xObject resources such as custom scripts or code table maps, it is best to create these before creating the SAP Component. For more information, see Creating Custom Scripts in the Composer User's Guide.
Copyright © 2003 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved. more ...