W R I T E A N D D E P L O Y J 2 E E A P P L I C A T I O N S
with the created connection and mdb subscription id is the name of the durable
subscription to be used.
In the onMessage() method you can access another EJB, a resource like a database, mail or
send a copy or a new message to another destination. Please take into consideration that it
is up to the application server how many instances of the same MDB it creates as it is with
SLSB. Therefore processing of messages can be concurrently and out of order. So you could
receive a place order message before create order message.
Web Applications
Web applications are running inside the JBoss application server. So they have access to the
container reserved JNDI namespace java:/comp but can also refer to other EJBs deployed
on the same application server. Because the JBoss web servers are running within the same
JVM its servlets (at runtime JSPs are servlets as well) can access all the resources in JBoss
locally.
The DTD of the JBoss specific DD jboss web.xml is defined as:
security domain?, context root?, virtual host?,
resource env ref*, resource ref* , ejb ref*
)>
The context root allows you to specify another document root for the standalone web
application but do not overwrite a document root in the Enterprise application DD
application.xml . The virtual host allow you to specify to which virtual host this
application is deployed too. Finally the resource ref and ejb ref allows you to specify the
references to resources and EJBs deployed on this server, which then later on can be
renamed by the deployer if necessary.
A Web application is typically deployed as WAR file that is nothing else than a regular Java
archive (JAR) with a different extension. It can contain the Web application DD web.xml
as well as the JBoss specific DD jboss web.xml . Note that these files must be added to the
WEB INF' directory instead of the META INF . Due the fact that a Web application is a
client to EJBs, if used, you have to add the Java archive containing the client EJB classes
into either the WEB INF/lib or WEB INF/classes directory.
Enterprise Applications
Enterprise applications are just a convenience package containing EJB applications, Web
applications and client EJB archives so that it can be deployed as single file. Currently there
is no additional features and therefore also no JBoss specific deployment descriptor for the
Enterprise applications.
50
footer
Our partners:
PHP: Hypertext Preprocessor Cheap Web Hosting
JSP Web Hosting
Ontario Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Java Hosting
Cheapest Hosting
Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved