Post Subject : Tutorial on J2EE using JBOSS-4.x, Eclipse-3.x, Lomboz-3.x and
PostgreSQL-8.x on Windows XP
Ref. 1 : Tutorial for building J2EE Applications using JBOSS and ECLIPSE
http://www.tusc.com.au/tutorial/html/chap8.html (Chapter 8 : Web
Clients - Servlet & JSP)
Ref. 2 : Tutorial on J2EE using JBOSS, ECLIPSE and Lomboz (Forum on Ref. 1)
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=36910
Ref. 3 : Environment in use ;
- Windows XP SP2
- J2SDK 1.4.2_08
- Eclipse 3.0.2
- JBoss 4.0.2
- Lomboz 3.0.1 + emf-sdo-runtime-2.0.0
- PostgreSQL 8.0.3 (= DefaultDS)
Followings are some notes on Chapter 8 (Servlet & JSP) in Ref. 1
* The notes cover creations of a Servlet named AccessController and a JSP named
showItems.
* Task numbers are based on Ref. 1
* No change has been made to the server definition file
(jboss402postgres.server) thus far.
Task 1 : Create AccessController Servlet
- on completion of AccessController, "super.init(config);" is added in "init()"
method. No need to hide it.
public void init(ServletConfig config) throws ServletException {
| super.init(config);
| //TODO Method stub generated by Lomboz
| }
- in "web.xml", DTD is not shown at the top.
- it seems the file without dtd works normally. If any trouble, add DTD like
below and see;
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN"
| "http://java.sun.com/dtd/web-app_2_3.dtd">
Task 2 : Add a business method to StoreAccess Bean named getAllItems()
: (as per the steps in Ref. 1)
Task 6 : Implement the processRequest method
Task 7 : Deploy the AccessController Servlet
- on completion of deployment, following message is shown in the console.
:
| 21:55:39,015 INFO [TomcatDeployer] deploy, ctxPath=/OnlineStore,
warUrl=file:/C:/jboss-4.0.2/server/postgres/tmp/deploy/tmp41196OnlineStore-exp.war/
Task 8 : Test the AccessController Servlet
(as per the steps in Ref. 1)
Task 9 : Create a JSP named showItems
: (as per the steps in Ref. 1)
Task 13 : Test the showItems.jsp page
=== Correction ===
- At the end of JBoss startup every time, an error message followed by others
on MBeans are shown as below.
- It seems there is no influence on the functions of beans up to this point,
i.e. end of Chapter 8.
:
| 23:57:42,218 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console,
warUrl=file:/C:/jboss-4.0.2/server/postgres/deploy/jmx-console.war/23:57:42,468
ERROR [URLDeploymentScanner] Incomplete Deployment listing:
| --- MBeans waiting for other MBeans ---
| ObjectName: jboss.jca:name=JmsXA,service=TxCM
| State: CONFIGURED
| I Depend On:
| jboss.jca:name=JmsXA,service=ManagedConnectionPool
| jboss.jca:service=CachedConnectionManager
| :
| :
| ObjectName: jboss.jca:name=JmsXA,service=ManagedConnectionFactory
| State: CONFIGURED
| I Depend On: jboss.jca:name='jms-ra.rar',service=RARDeployment
Depends On Me:
| jboss.jca:name=JmsXA,service=ManagedConnectionPool
|
| ObjectName: jboss.jca:name=JmsXA,service=ConnectionFactoryBinding
| State: CONFIGURED
| I Depend On:
| jboss.jca:name=JmsXA,service=TxCM
|
| --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---ObjectName:
jboss.jca:name='jms-ra.rar',service=RARDeployment State: NOTYETINSTALLED
| Depends On Me:
| jboss.jca:name=JmsXA,service=ManagedConnectionFactory
|
|
| 23:57:42,609 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on
http-0.0.0.0-8080
| 23:57:42,718 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
| 23:57:42,734 INFO [JkMain] Jk running ID=0 time=0/63 config=null
| 23:57:42,765 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build:
CVSTag=JBoss_4_0_2 date=200505022023)] Started in 24s:437ms
| :
- The messages can be eliminated with following corrections.
= remove ".bak" from "/jboss-4.0.2/server/postgres/deploy/jms.bak" to activate
the "jms" folder. (ref. Step 11 in the first post of this thread)
= put ".bak" to hajndi-jms-ds.xml under "/postgres/deploy/jms" to disable.
- "jms-ra.rar" is only one active file in "/postgres/deploy/jms" folder as a
result.
jbosszone
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3882611#3882611
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3882611
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user