[jboss-user] [Beginner's Corner] - config file *-service.xml in jms message driven bean ejb 3.0

Hai Nguyen do-not-reply at jboss.com
Sun Nov 25 15:32:58 EST 2012


Hai Nguyen [https://community.jboss.org/people/micro_] created the discussion

"config file *-service.xml  in jms message driven bean ejb 3.0"

To view the discussion, visit: https://community.jboss.org/message/778236#778236

--------------------------------------------------------------
Hi  everyboy!
Im a new bie in ejb3.0 i get difficult with  config file *-service.xml  in jms message driven bean ejb 3.0
 how to config  To lookup JNDI in *-service.xml  for QueueConnectionFactory in EJB3.0.
I need a  clearly example to understand it!  it is truly to thank you for any help!
---
This is error , What reasons jndi is null> can you give a reason . thank you much! 
|| *Status when deploy message driven bean
* ||
| 
01:21:28,396 INFO  [EJBContainer] STOPPED EJB: mdb.SendMailMDB ejbName: SendMailMDB
01:21:28,485 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1604576652{vfszip:/D:/devtool/jboss-5.0.1.GA/server/default/deploy/g3_DVDShop_MDB_Module.jar/}
01:21:28,485 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1604576652{vfszip:/D:/devtool/jboss-5.0.1.GA/server/default/deploy/g3_DVDShop_MDB_Module.jar/}
01:21:28,485 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1604576652{vfszip:/D:/devtool/jboss-5.0.1.GA/server/default/deploy/g3_DVDShop_MDB_Module.jar/}
01:21:28,485 INFO  [Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1604576652{vfszip:/D:/devtool/jboss-5.0.1.GA/server/default/deploy/g3_DVDShop_MDB_Module.jar/}
01:21:28,510 INFO  [JBossASKernel] Created KernelDeployment for: g3_DVDShop_MDB_Module.jar
01:21:28,510 INFO  [JBossASKernel] installing bean: jboss.j2ee:jar=g3_DVDShop_MDB_Module.jar,name=SendMailMDB,service=EJB3
01:21:28,510 INFO  [JBossASKernel]   with dependencies:
01:21:28,510 INFO  [JBossASKernel]   and demands:
01:21:28,510 INFO  [JBossASKernel]         jboss.ejb:service=EJBTimerService
01:21:28,510 INFO  [JBossASKernel]   and supplies:
01:21:28,510 INFO  [JBossASKernel]         jndi:null
01:21:28,510 INFO  [JBossASKernel]         Class:javax.jms.MessageListener
01:21:28,510 INFO  [JBossASKernel] Added bean(jboss.j2ee:jar=g3_DVDShop_MDB_Module.jar,name=SendMailMDB,service=EJB3) to KernelDeployment of: g3_DVDShop_MDB_Module.jar
01:21:28,533 INFO  [EJBContainer] STARTED EJB: mdb.SendMailMDB ejbName: SendMailMDB |

----
when i deloy and run Web application 
jboss raise error at line code 
   factory = (QueueConnectionFactory) jndiContext.lookup("dvdshop_jms_conectionfactory");

Contetn of error at org.jboss.aop.classpool.AOPClassPool.(ObjectStreamClass.java:455)        at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:352)        at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:589)        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)        at java.rmi.MarshalledObject.get(MarshalledObject.java:159)        at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:765)        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:682)        at javax.naming.InitialContext.lookup(InitialContext.java:411)        at utility.SendMailUility.SenMail(SendMailUility.java:60)        at action.RegisterProccessAction.execute(RegisterProccessAction.java:89)        at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)        at java.lang.Thread.run(Thread.java:722)

==========
I think  i dont  config correctly file *-service.xml in  default/deploy
|| *dvdshop-jms-connection-factories-service.xml
* ||
| <?xml version="1.0" encoding="UTF-8"?>


<server>
          <mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
      name="jboss.messaging.connectionfactory:service=dvdshop_jms_conectionfactory"
      xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
                    <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                    <depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket</depends>
                    <depends>jboss.messaging:service=PostOffice</depends>
                    <attribute name="SupportsFailover">false</attribute>
                    <attribute name="SupportsLoadBalancing">false</attribute>
                    <attribute name="JNDIBindings">
                              <bindings>
                                        <binding>dvdshop_jms_conectionfactory</binding>
                              </bindings>
                    </attribute>
          </mbean>
</server> |




 i am headaching  about this error , please help me , thank you much!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778236#778236]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121125/eab2816e/attachment.html 


More information about the jboss-user mailing list