Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
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
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
 
- Fail to inject Queue as Resource into EJB3 bean

- Fail to inject Queue as Resource into EJB3 bean

2007-06-12       - By jmarvan

 Back
I am unable to send a JMS message from within an EJB3 stateless session bean
into a local queue.

The bean method that is supposed to send to the Queue is invoked from a servlet.

//Inject QueueConnectionFactory
 | @(protected)(mappedName = "java:/JmsXA")
 |   private QueueConnectionFactory queueConnectionFactory;


 | //Inject the queue.
 | @(protected)(mappedName = "xxx")  //xxx = various values.
 | private Queue queue;


When I set xxx to queue/MODEL_EVENTS, I get SocketException "Recevie Timed out"
.  

When I set xxx to jnp://localhost:1099/queue/MODEL_EVENTS, I actually get org
.jboss.mq.SpyQueue out of it, but it fails to cast into javax.jms.Queue Source code of javax.jms.Queue and
produces the "Non matching type for inject of field" message.  I suspect I am
just getting the Remote interface of the Queue here.

Setting "java:comp/env/queue/MODEL_EVENTS" for xxx fails with "queue not bound"
javax.naming.NamingException Source code of javax.naming.NamingException  That makes sense since I don't se the queue
registered within the java: context.

I may have lost a marble or two over this already, what am I missing?
Somebody please help before I lose more!

Jaroslav


Following are contents of JMX bean.

java: Namespace

 +- SynergyConfigurationDS (class: org.jboss.resource.adapter.jdbc
.WrapperDataSource)
 |   +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory Source code of org.jboss.mq.SpyXAConnectionFactory)
 |   +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource Source code of org.jboss.resource.adapter.jdbc.WrapperDataSource)
 |   +- SecurityProxyFactory (class: org.jboss.security
.SubjectSecurityProxyFactory)
 |   +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
 |   +- comp (class: javax.naming.Context Source code of javax.naming.Context)
 |   +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl Source code of org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
 |   +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory Source code of org.jboss.mq.SpyConnectionFactory)
 |   +- jaas (class: javax.naming.Context Source code of javax.naming.Context)
 |   |   +- HsqlDbRealm (class: org.jboss.security.plugins
.SecurityDomainContext)
 |   |   +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext Source code of org.jboss.security.plugins.SecurityDomainContext)
 |   |   +- JmsXARealm (class: org.jboss.security.plugins
.SecurityDomainContext)
 |   +- timedCacheFactory (class: javax.naming.Context Source code of javax.naming.Context)
 | Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
 |   +- TransactionPropagationContextExporter (class: org.jboss.tm
.TransactionPropagationContextFactory)
 |   +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory Source code of org.jboss.jms.asf.StdServerSessionPoolFactory)
 |   +- Mail (class: javax.mail.Session Source code of javax.mail.Session)
 |   +- comp.ejb3 (class: javax.naming.Context Source code of javax.naming.Context)
 |   |   NonContext: null
 |   +- TransactionPropagationContextImporter (class: org.jboss.tm
.TransactionPropagationContextImporter)
 |   +- TransactionManager (class: org.jboss.tm.TxManager Source code of org.jboss.tm.TxManager)
 |   +- synergyModelDS (class: org.jboss.resource.adapter.jdbc
.WrapperDataSource)


Global JNDI Namespace

+- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory Source code of org.jboss.mq.SpyXAConnectionFactory)
 |   +- ConfigurationServiceBean (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- local (proxy: $Proxy66 implements interface net.symmetrics.synergy
.config.ejb.ConfigurationService,interface org.jboss.ejb3.JBossProxy,interface
javax.ejb.EJBLocalObject Source code of javax.ejb.EJBLocalObject)
 |   |   +- remote (proxy: $Proxy65 implements interface net.symmetrics
.synergy.config.ejb.ConfigurationService,interface org.jboss.ejb3.JBossProxy
,interface javax.ejb.EJBObject Source code of javax.ejb.EJBObject)
 |   +- TopicConnectionFactory (class: org.jboss.naming.LinkRefPair)
 |   +- EventDispatcher (class: org.jboss.ws.eventing.mgmt.DispatcherDelegate)
 |   +- UserTransactionSessionFactory (proxy: $Proxy43 implements interface
org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory Source code of org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
 |   +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax.naming
.LinkRef)
 |   +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax
.naming.LinkRef)
 |   +- QueueConnectionFactory (class: org.jboss.naming.LinkRefPair)
 |   +- topic (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- testDurableTopic (class: org.jboss.mq.SpyTopic Source code of org.jboss.mq.SpyTopic)
 |   |   +- testTopic (class: org.jboss.mq.SpyTopic Source code of org.jboss.mq.SpyTopic)
 |   |   +- securedTopic (class: org.jboss.mq.SpyTopic Source code of org.jboss.mq.SpyTopic)
 |   +- queue (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- MODEL_EVENTS (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- D (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- C (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- B (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- A (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- testQueue (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- ex (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- DLQ (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   |   +- ETL_STATUS (class: org.jboss.mq.SpyQueue Source code of org.jboss.mq.SpyQueue)
 |   +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory Source code of org.jboss.mq.SpyConnectionFactory)
 |   +- UserTransaction (class: org.jboss.tm.usertx.client
.ClientUserTransaction)
 |   +- PentahoModelRepositoryBean (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- local (proxy: $Proxy87 implements interface net.symmetrics.synergy
.model.repository.PentahoModelRepository,interface org.jboss.ejb3.JBossProxy
,interface javax.ejb.EJBLocalObject Source code of javax.ejb.EJBLocalObject)
 |   |   +- remote (proxy: $Proxy86 implements interface net.symmetrics
.synergy.model.repository.PentahoModelRepository,interface org.jboss.ejb3
.JBossProxy,interface javax.ejb.EJBObject Source code of javax.ejb.EJBObject)
 |   +- ModelRepositoryBean (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- local (proxy: $Proxy84 implements interface net.symmetrics.synergy
.model.repository.ModelRepository,interface org.jboss.ejb3.JBossProxy,interface
javax.ejb.EJBLocalObject Source code of javax.ejb.EJBLocalObject)
 |   |   +- remote (proxy: $Proxy83 implements interface net.symmetrics
.synergy.model.repository.ModelRepository,interface org.jboss.ejb3.JBossProxy
,interface javax.ejb.EJBObject Source code of javax.ejb.EJBObject)
 |   +- jmx (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   +- invoker (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   |   +- RMIAdaptor (proxy: $Proxy37 implements interface org.jboss.jmx
.adaptor.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)
 |   |   +- rmi (class: org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext)
 |   |   |   +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax
.naming.LinkRef)
 |   +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax
.naming.LinkRef)
 |   +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming
.LinkRef)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4053766#4053766

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4053766
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

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