Sun Java System Application Server Standard and Enterprise Edition 7 2004Q2 Update 7 Release Notes

Sample Applications

This section describes known sample application issues and associated solutions.

ID 

Summary 

5048279

Steps 1&2 of the Precompilation Tasks section of JDBC Realm Authentication sample is incomplete.

Solution

The proper steps for 1 and 2 should be: 

  1. 1. Start the PointBase database server.

    Go to the appserver_install_root/pointbase/server directory and run the StartServer.sh script.

  2. Start the PointBase Console.

    • Go to the appserver_install_root/pointbase/client_tools directory and run the PB_console.sh script.

    • The database URL is: jdbc:pontbase:server://localhost/sun-appserv-samples

    • The default admin username is: security.

    • The default admin password is: security.

  3. Verify that the PUBLIC.user_tbl exists and contains users.

    • Navigate to the Catalog -> Catalog menu item.

    • Within the Database Catalog, navigate to the PUBLIC, TABLES, USER_TBL node.

    • Right-click the USER_TBL node and click SELECT * FROM "PUBLIC"."USER_TBL" within the pop-up menu.

4739854

Instructions needed for deploying resources using asadmin.

In the documentation for some samples, your are instructed to deploy the application using the asadmin command, but no explanation is provided on how to create the needed resources.

Solution

You can deploy the application/resource by using the asadmin command and can get more information by referring to the sample’s build.xml file. More information can also be found in the printout from running asant deploy.

For JDBC/BLOB example, the following steps create the resources using asadmin (assuming the hostname is jackiel2 and the username/password/port for the Admin Server is admin/adminadmin/4848):

asadmin create-jdbc-connection-pool --port 4848 --host jackiel2 --password adminadmin --user admin jdbc-simple-pool

--datasourceclassname com.pointbase.jdbc.jdbcDataSource --instance server1

asadmin set --port 4848 --host jackiel2 --password adminadmin --user admin

server1.jdbc-connection-pool.jdbc-simple-pool.property.DatabaseName=jdbc:pointbase:server://localhost/sun-appserv-samples

4993620

afterCompletion() called with false when more than one XA connection is used.

Using a modified version of samples/transactions/ejb/cmt/bank application - The BankBean ejb connects to two databases. one for checking a/c and one for saving. There are two connection pools created which are configured for oracle.jdbc.xa.client.OracleXADataSource datasource and global transactions have been turned on.

Running the standalone client which transfers some balance and retrieves the checking as well as saving balances, three remote calls are made - transferBalance(), getCheckingBalance() and getSavingsBalance().

It is observed that afterCompletion for getCheckingBalance() invocation is called with committed=false, although all the database operations were successful.

For example, the following is executed: 

appclient -client /space/S1AS/installation/domains/domain1/server1/applications/j2ee-apps/transactions-bank_13/transact -name BankClient -textauth com.sun.jndi.cosnaming.CNCtxFactory iiop://localhost:3700

Result: afterCompletion() is called with false even though tx is successful for a stateful session bean that uses more than one XA connections and performs only read-only db operations.

Solution

The current JTS implementation does not support this. 

5016748

The description for running SFSB Failover sample application using java client is incorrect.

The java command for running the SFSB Failover sample application in the sample application documentation is incorrect. 

Solution

The following is the correct description for running sfsbFailover with java client: 

Running sfsbFailover sample with local or remote RMI/IIOP-based client without ACC: 

The java client is executed without using the interface of Application Client Container. It can be executed on the local machine (ashost) or a remote machine. The client application runs from the command line, i.e. 

java -Djava.library.path=$AS_INSTALL/lib:/usr/lib/mps

-Dcom.sun.CORBA.connection.ORBSocketFactoryClass=com.sun.enterprise.iiop.EEIIOPSocketFactory-Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sun.appserv.ee.iiop.EEORBInitializer-Dorg.omg.CORBA.ORBClass=com.sun.enterprise.iiop.POAEJBORB-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.internal.corba.ORBSingleton-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.internal.POA.ShutdownUtilDelegate-classpath <CP> <ClientApp>java.naming.factory.initial=com.sun.appserv.naming.S1ASCtxFactorycom.sun.appserv.iiop.loadbalancingpolicy=ic-basedcom.sun.appserv.iiop.endpoints=host:port,host:port

where: 

  • CP includes five jar files for CLASSPATH which are sfsbFailover.jar, appserv-rt.jar, appserv-ext.jar and appserver-rt-ee.jar,appserv-admin.jar.

The file of sfsbFailoverClient.jar is copied to the current directory from the deployment directory: install_dir/domains/domain1/server1/applications/j2ee-apps/sfsbFailover_1

The other jars are copied to the current directory from AS installation: install_dir/lib

If you intend to run the client application on a remote machine, you need to transfer the sfsbFailoverClient.jar and other three appserver jar files to the client machine. Although the sfsbFailoverClient.jar file is used in this example to run application client with or without an ACC, it contains more files than absolutely necessary for the situation in which an ACC is not used. The minimal files required to run the example on a remote machine without an ACC are the appserv-ext.jar file and the following files as extracted from the sfsbFailoverClient.jar file:

samples/ejb/stateful/simple/ejb/Cart.class - Remote Interfacesamples/ejb/stateful/simple/ejb/CartHome.class - Home Interfacesamples/ejb/stateful/simple/ejb/_Cart_Stub.class - Remote Stubsamples/ejb/stateful/simple/ejb/_CartHome_Stub.class - Home Stubsamples/ejb/stateful/simple/client/CartClient.class - Client Application Main Class

The appserv-ext.jar file is required on the client machine because it contains the javax.ejb package that the client needs, and also contains the implementation and interface for J2EE APIs that the client may need.

  • ClientApp refers to the client program. In this example: samples.ejb.stateful.simple.client.CartClient

5016748 cont.

  • URL refers to the comma separated list of application server running as part of one cluster with hostname (e.g. ashost) and with an ORB-port (e.g. 3700). For example,

ashost:3700,ashost:3701,ashost:3702

The following is a complete example for the command: 

java -Djava.library.path=$AS_ISNTALLlib:/usr/lib/mps

-Dcom.sun.CORBA.connection.ORBSocketFactoryClass=com.sun.enterprise.iiop.EEIIOPSocketFactory-Dorg.omg.PortableInterceptor.ORBInitializerClass.com.sun.appserv.ee.iiop.EEORBInitializer-Dorg.omg.CORBA.ORBClass=com.sun.enterprise.iiop.POAEJBORB-Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.ee.internal.corba.ORBSingleton-Djavax.rmi.CORBA.UtilClass=com.sun.corba.ee.internal.POA.ShutdownUtilDelegate -classpathsfsbFailoverClient.jar:appserv-ext.jar:appserv-rt.jar:appserv-rt-ee.jar:appserv-admin.jarsamples.ejb.stateful.simple.client.CartClientjava.naming.factory.initial=com.sun.appserv.naming.S1ASCtxFactorycom.sun.appserv.iiop.loadbalancingpolicy=ic-basedcom.sun.appserv.iiop.endpoints=localhost:3700,localhost:3701

Include $AS_INSTALL/lib and /usr/lib/mps in LD_LIBRARY_PATH before running the command. 

You will see interactive console, which helps you to also test the high availability of the SFSB, InitialContext, Home reference and remote reference. After creating the InitialContext, press Enter. The reference is failed over to another available server instance. You can test the failover behavior for home reference, remote reference as well in the same way.

5016656

Samples document points to incorrect path for PointBase startup scripts.

The path of startserver.sh is incorrectly mentioned as pointbase_install_dir/tools/server/startserver.sh.

Solution

The correct path to the PointBase startup script is pointbase_install_dir/client_tools/server/startserver.sh.

5016647

Indent-amount issue with Coffee Break application in JWSDP 1.0_01.

The following error is displayed while running the Coffee Break sample application: 

ERROR: output property ’indent-amount’ not recognized 

Solution

This is a known issue in JWSDP 1.0_01. To avoid this issue, use a JWSDP version later than 1.1.