6 integration, Integrations for ejb container, Integration of nsasj with nsjsp – HP Integrity NonStop H-Series User Manual
Page 90: Integration of nsasj with nsmq

6 Integration
Integrations for EJB Container
Integration of NSASJ with NSJSP
NSJSP is a Servlets and JavaServer Pages (JSP) container available on HP NonStop operating
systems. A servlet container provides an environment in which you can deploy, execute, and
manage web applications based on servlets or JSPs. NSJSP is written in Java, and it offers a
standards-based environment to host Java Servlet and JSP applications.
NSASJ provides a client library that can be used to invoke EJBs on NSASJ from a web application
on NSJSP. The client library is present in the <NSASJ_HOME>/bin/client folder. The client
library can be packaged with each application or can be made available to all the applications
deployed on the container. This can be done by copying the library (multiple jar files) to the folder
referenced by the system property catalina.home. For more information on catalina.home, see
Configuration chapter in NonStop Servlets for Java Server Pages 7.0 System Administrator's Guide.
Since, each application normally connects to its own EJB environment, and hence have an
application specific jboss-ejb-client.properties file packaged with the application, it is
suggested that the client libraries also be packaged with the application.
Since NSASJ and NSJSP run on NonStop, it is possible to connect the EJB client running on NSJSP
to NSASJ directly through JI instead of routing the requests through Post Master. This can be done
by configuring the client socket as a JI Pathsend socket. For example, If the EJBs are available on
port 4500 on the IP address prod.ind.hp.com, the entry in the JI properties file is similar to
client_socket-prod.ind.hp.com:4500
,
pathmon=$SWEB:serverclass=nsasj-SERVER
, where,$SWEB is the pathmon where NSASJ
is installed.nsasj-SERVER is the name of the NSASJ server serverclass. For more information on
JI, see the Java Infrastructure chapter in NonStop Server for Java 7.0 Programmer's Reference
manual.
Integration of NSASJ with NSMQ
The NSASJ integrates with NSMQ using resource adapters specified as RAR (Resource Adapter
Archive file). This RAR file is located in the lib directory. The integration includes inbound messages
to be handled by MDB (Message Driven Beans) and outbound messages published by state less
or state full EJB (Enterprise Java Beans). The resource adapter participates in the following contracts
of JCA (Java Connector Architecture).
•
Connection Management Contract: Allows applications to connect to NSMQ through the
resource adapter. It also allows the application server to pool connection requests.
•
Transaction Management Contract: Allows an application to manage and perform transactional
access for sending and receiving messages.
•
Security Contract: Provides support for secure access to NSMQ.
This requires NSASJ to be configured to interact with NSMQ, and NSMQ to be configured to
expose the required functionality. Only TCP protocol based integration is supported by NSMQ.
Perform the following steps to configure the NSASJ integration with NSMQ:
1.
Create a temporary directory <temp>.
2.
Unzip the contents of archive file
directory.
3.
Open <temp>/META-INF/ra.xml and change the following properties in the
element:
•
Change the URL to point to the NSMQ listen URL
90
Integration