Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
JNDI lookup of DataSource by message-driven bean

JNDI lookup of DataSource by message-driven bean

2004-06-12       - By Tim Wood

 Back
"Advanced" situation here.  My application (in Sun's J2EE SDK 1.4) consists of
several stateless session beans (SSB), defined as SOAP endpoints, and 2 message
-driven beans (MDB) used internally.  One class (com.myapp.orderServer.jaxRPC
.dblDuty.Impl) does double duty as an SSB and as an MDB (one instance for each
bean is created).

All the beans use JNDI to locate a JDBC DataSource that each uses for DBMS
transactions.  If the MDB instance of dblDuty.Impl gets control first, its JNDI
lookup for the DataSource fails with the log messages below.  The bean business
logic thus fails to initialize and the system can't run.  My workaround is to
"prime" the system by "ping"ing the SSBs via SOAP when the app. is started, so
the DataSources are first looked up in the SSBs.  Then all beans start and run
fine.  All the beans are configured in the deployment descriptor to use the
right resources.  So why does it matter to JNDI which bean calls it for a
lookup first??

Thanks,
Tim

javax.naming.NamingException Source code of javax.naming.NamingException: invocation exception
       at com.sun.enterprise.naming.NamingManagerImpl.getComponentId
(NamingManagerImpl.java:959)
       at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl
.java:658)
       at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext
.java:108)
       at javax.naming.InitialContext Source code of javax.naming.InitialContext(InitialContext.java:347)
       at com.myapp.orderServer.impl.DatabaseConnectionPool
.provideFacetDataSource(DatabaseConnectionPool.java:118)
       at com.myapp.orderServer.impl.FacetImpl.initDataSource(FacetImpl.java
:116)
       at com.myapp.orderServer.impl.DblDuty.<init>(DblDuty.java:93)
       at com.myapp.orderServer.impl.DblDuty<clinit>(DblDuty.java:81)
       at com.myapp.orderServer.jaxRPC.dblDuty.Impl.<init>(Impl.java:72)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
       ...
       at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl
.deliverAndAcknowledge(MessageConsumerImpl.java:247)
       at com.sun.messaging.jmq.jmsclient.MessageConsumerImpl.onMessage
(MessageConsumerImpl.java:210)
       at com.sun.messaging.jmq.jmsclient.SessionReader.deliver(SessionReader
.java:61)
       at com.sun.messaging.jmq.jmsclient.ConsumerReader.run(ConsumerReader
.java:139)
       at java.lang.Thread Source code of java.lang.Thread(Thread.java:534)

[#|2004-06-10T21:47:17.324-0700|SEVERE|j2ee-appserver1.4|javax.enterprise
.system.container.ejb.mdb|_ThreadID=11;|MDB00042: [OrderServer:DblDutyMDB]: No
invocation for message []|#]

MQRA:ML:Caught Exception from onMessage():OrderServer:DblDutyMDB: message
-driven bean invocation closed by container
[#|2004-06-10T21:47:17.414-0700|INFO|j2ee-appserver1.4|javax.enterprise.system
.container.web|_ThreadID=10;|WEB0100: Loading web module [adminapp] in virtual
server [server] at [/web1]|#]

MQRA:ML:Caught Exception from onMessage():OrderServer:DblDutyMDB: message
-driven bean invocation closed by container
MQRA:ML:Exhausted redelivery Attempts-shutting down delivery for ActvationSpec
configuration=
       DestinationType                     =javax.jms.Queue
       Destination                         =DblDuty
       MessageSelector                     =null
       AcknowledgeMode                     =Auto-acknowledge
       SubscriptionDurability              =NonDurable
       ClientId                            =null
       SubscriptionName                    =null
       ConnectionFactoryJNDIName           =null
       EndpointPoolMaxSize                 =32
       EndpointPoolSteadySize              =0
       EndpointPoolResizeCount             =8
       EndpointPoolResizeTimeout           =600
       EndpointExceptionRedeliveryAttempts =1
       EndpointExceptionRedeliveryInterval =100
       AddressList                         =null

===========================================================================
To unsubscribe, send email to listserv@(protected) and include in the body
of the message "signoff J2EE-INTEREST".  For general help, send email to
listserv@(protected) and include in the body of the message "help".

©2008 junlu.com - Jax Systems, LLC, U.S.A.