Before you begin, make sure that the system containing WebSphere Application Server also has IBM(R) Communications Server Version 6.1.1.0 installed.
To install the SNA JCA LU0Connector, complete the following steps:
To test the connector and environment configuration, use code like the following example to test the SNA Lu0 Connector in a managed environment. You can include the method in EJB or servlet code.
private void runHostTransaction() throws Exception { javax.naming.Context initialContext = new javax.naming.InitialContext(); ConnectionFactory connectionFactory = (ConnectionFactory) initialContext.lookup("LU0SNA"); Connection connection = connectionFactory.getConnection(); Interaction interaction = connection.createInteraction(); Lu0InteractionSpec interactionSpec = new Lu0InteractionSpec(); interactionSpec.setInteractionVerb(interactionSpec.SYNC_SEND); Lu0Record in = new Lu0Record(); Lu0Record out = new Lu0Record(); in.setData("AIR2TO "); interaction.execute(interactionSpec, in, null); interactionSpec.setInteractionVerb(interactionSpec.SYNC_RECEIVE); interactionSpec.setExecutionTimeout(1000); interaction.execute(interactionSpec, null, out); System.out.println("Data received: " + out.getData()); interaction.close(); connection.close(); }