[EJB 3.0] - Ejb3 - MDB
by rudreshtcs
Hi,
I was trying one of the Interceptors example given below
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/...
I had deployed the application on - jboss-5.0.0.GA
I am getting below errors and application is not getting deployed, i had even tried with simple MDB, even that is not working
Added bean(jboss.j2ee:jar=InterceptorTest.jar,name=EmailSystemBean,service=EJB3) to KernelDeployment of: InterceptorTest.jar
17:50:29,983 INFO [EJBContainer] STARTED EJB: org.jboss.tutorial.interceptor.bean.AccountsMDB ejbName: AccountsMDB
17:50:29,999 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@5bce28(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)e8d651 destination=queue/tutorial/accounts destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
javax.naming.NameNotFoundException: queue not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
at org.jnp.server.NamingServer.lookup(NamingServer.java:396)
Kindly Help me on solving the above error
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204853#4204853
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204853
17 years, 2 months
[Installation, Configuration & DEPLOYMENT] - Re: Performance parameters for JBOSS
by kcbraunschweig
I'm running jboss 4.2.1. Here are a few other things you could try:
1. Just go to your server's IP in your browser on port 8080. You should get a default jboss landing page with a link to the jmx-console among others. You may find that you don't have the jmx console loaded.
2. You can also poke at stuff from the command line with twiddle. For starters you can list the objects that are available like this:
| % twiddle.sh -s localhost serverinfo -l
|
That will give you a big list of objects. If you want to know about one, get its info like this:
| % twiddle.sh -s localhost info jboss.system:type=ServerInfo
|
You'll get a description and a list of Attributes and Operations supported by that object. If you want to actually get the object, try this:
| % twiddle.sh -s localhost get jboss.system:type=ServerInfo
|
That object has some memory stats in it so may be interesting to you. My problem now though is that I've found some objects in the list that I can run the "info" command on but not the "get" command and I don't know why. Here's an example:
| % twiddle.sh -s localhost get jboss:service=Naming
| 14:48:56,435 ERROR [Twiddle] Exec failed
| java.io.NotSerializableException: java.lang.reflect.Method
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
|
If you figure out any more, I'd be interested. Still new at this also.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204852#4204852
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204852
17 years, 2 months
[EJB 3.0] - Injection of QueueConnectionFactory and Queue from ENC in ap
by Wolfgang Knauf
Hi all,
I try to use the @Resource annotation to inject a QueueConnectionFactory and a Queue (to a MDB) in an EJB3 application client.
I run into strange problems which I cannot explain, but got it finally working.
For injecting the QueueConnectionFactory, I could use an ENC entry:
@Resource(name="jms/MBConnectionFactory")
| //This is the global JNDI name (works fine)
| //@Resource(mappedName="ConnectionFactory")
| private static QueueConnectionFactory queueConnectionFactory;
(the commented line of code injects the factory from global JNDI, and this works also).
But for the Queue, the ENC could not be used (results in "...not bound" exceptions). Here, I was forced to use the global name:
@Resource(mappedName="queue/MessageBeanQueue")
| //Using the ENC Does NOT work!
| //@Resource(name="jms/MBQueueRef")
| //@Resource(mappedName="jms/MBQueueRef")
| private static Queue queue;
application-client.xml and jboss-client.xml define the resource references. Here is "jboss-client.xml":
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss-client PUBLIC
| "-//JBoss//DTD Application Client 5.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-client_5_0.dtd">
| <jboss-client>
| <jndi-name>MessageClient</jndi-name>
| <resource-ref>
| <res-ref-name>jms/MBConnectionFactory</res-ref-name>
| <jndi-name>ConnectionFactory</jndi-name>
| </resource-ref>
| <resource-ref>
| <res-ref-name>jms/MBQueueRef</res-ref-name>
| <jndi-name>queue/MessageBeanQueue</jndi-name>
| </resource-ref>
| </jboss-client>
Lookup through InitialContext works fine, so the ENC is valid.
Am I doing something wrong? Is there an injection bug (ENC works for the QueueConnectionFactory, but not for the Queue)?
My sample can be found here:
http://www.informatik.fh-wiesbaden.de/~knauf/private/mdb/injection/
(it differs from the one of my post http://www.jboss.com/index.html?module=bb&op=viewtopic&t=149328, so all four files are required)
Thanks
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204839#4204839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204839
17 years, 2 months
[EJB 3.0] - MDB redeploy with ...-service.xml
by Wolfgang Knauf
Hi all,
I try to deploy an EJB3 MDB to JBoss 5.0GA, and I want to do the Queue config trough a ...-service.xml file in the EJB jar.
Here is the config file:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE server
| PUBLIC "-//JBoss//DTD MBean Service 5.0//EN"
| "http://www.jboss.org/j2ee/dtd/jboss-service_5_0.dtd">
| <server>
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="knauf:service=Queue,name=MessageBeanQueue"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <attribute name="JNDIName">queue/MessageBeanQueue</attribute>
| <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| </mbean>
| </server>
This works fine on first deploy. But on every redeploy, I see those error messages in the console:
22:33:04,796 WARN [AbstractDeploymentContext] Unable to register deployment mbean vfszip:/C:/temp/jboss-5.0.0.GA/server/default/deploy/Message.ear/MessageEJB.jar/knaufmq-service.xml
| javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/C:/temp/jboss-5.0.0.GA/server/default/deploy/Message.ear/MessageEJB.jar/knaufmq-service.xml",type=SubDeployment already registered.
| at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
| at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
| at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| ...
| MDB deployment output
| ...
| 22:33:05,000 WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1053a6b(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)15d0009 destination=queue/MessageBeanQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
| javax.naming.NameNotFoundException: MessageBeanQueue not bound
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
| at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
| at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
| at org.jnp.server.NamingServer.lookup(NamingServer.java:399)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:713)
| at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
| at javax.naming.InitialContext.lookup(Unknown Source)
| at org.jboss.util.naming.Util.lookup(Util.java:222)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.setupDestination(JmsActivation.java:464)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation.setup(JmsActivation.java:352)
| at org.jboss.resource.adapter.jms.inflow.JmsActivation$SetupActivation.run(JmsActivation.java:729)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:260)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
| at java.lang.Thread.run(Unknown Source)
| 22:33:05,031 INFO [QueueService] Queue[queue/MessageBeanQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
| 22:33:15,000 INFO [JmsActivation] Attempting to reconnect org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@1053a6b(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter(a)15d0009 destination=queue/MessageBeanQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5)
| 22:33:15,015 INFO [JmsActivation] Reconnected with messaging provider.
|
Nevertheless, my app works fine. When deleting the EAR file, the queue is removed from JNDI view.
Configuring the app through "destinations-service.xml" works fine.
I created a full sample here:
http://www.informatik.fh-wiesbaden.de/~knauf/private/mdb/service/
(deploy EAR file to jboss, then use "startclient.bat" + "MessageClient.jar " + "log4j.properties" to start the app client => click on "Send message" button to send a message to the server).
Can someone help me with this error? Am I doing something wrong? Is this a deployment error of JBoss5?
Thanks
Wolfgang
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204834#4204834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204834
17 years, 2 months