-
1. Re: Configuring Destinations
ovidiu.feodorov Apr 5, 2006 1:25 PM (in response to timfox)... and this is how to deploy a topic:
Create a mytopic-service.xml file with the following content<server> <loader-repository>jboss.messaging:loader=ScopedLoaderRepository <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> <mbean code="org.jboss.jms.server.destination.Topic" name="jboss.messaging.destination:service=Topic,name=myTopic" xmbean-dd="xmdesc/Topic-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> </mbean> </server>
and copy it in $JBOSS_HOME/server/messaging/deploy
This is what you should see in the log after a successful deployment:... 10:22:11,771 INFO [Topic] Topic[/topic/myTopic] started, fullSize=75000, pageSize=2000, downCacheSize=1000
-
2. Re: Configuring Destinations
ensonik Sep 5, 2006 9:09 AM (in response to timfox)I'm getting the same problem, even with the updated XML you've included. The problem here (I believe) is that my [myname]-service.xml file resides in the deployed .ear file and not in the [deploy] directory. I need that file to reside with the app deployment.
Is this supported as it is with JBossMQ?
Thanks. -
3. Re: Configuring Destinations
ovidiu.feodorov Sep 5, 2006 1:53 PM (in response to timfox)What is the exact error you're getting?
Please post it here, and I also need the "topology" of your deployment: the ear deployment descriptors, the service deployment descriptors and your ear structure. -
4. Re: Configuring Destinations
ensonik Sep 7, 2006 8:00 AM (in response to timfox)Hi.
It starts up the example queues and topics fine:07:50:50,404 INFO [Queue] Queue[/queue/C] started, fullSize=75000, pageSize=2000, downCacheSize=2000
I then copy the definition for one of those topics to my deployment file:<mbean code="org.jboss.jms.server.destination.Topic" name="jboss.messaging.destination:service=Topic,name=testTopic" xmbean-dd="xmdesc/Topic-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <attribute name="SecurityConfig"> <security> <role name="guest" read="true" write="true"/> <role name="publisher" read="true" write="true" create="false"/> <role name="durpublisher" read="true" write="true" create="true"/> </security> </attribute> </mbean>
This will show the following error:org.jboss.deployment.DeploymentInfo@b5701711 { url=file:/F:/jboss-4.0.4.GA/server/messaging/deploy/my.ear/ } deployer: org.jboss.deployment.EARDeployer@738a71 status: Deployment FAILED reason: No ClassLoaders found for: org.jboss.jms.server.destination.Topic; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.server.destination.Topic) state: FAILED watch: file:/F:/jboss-4.0.4.GA/server/messaging/deploy/my.ear/META-INF/application.xml altDD: null lastDeployed: 1157630180754 lastModified: 1157487949404 mbeans:
My definition file is in an exploded ear file.
my.ear
--META-INF
--myEjb.jar
--myWeb.war
The destinations are defined in a file called myfile-destinations-service.xml which is at the root of the myEjb.jar file/directory.
Thanks for the help. -
5. Re: Configuring Destinations
ovidiu.feodorov Sep 11, 2006 6:18 PM (in response to timfox)Your whole ear needs to be scoped.
Add a jboss-app.xml in your ear's META-INF. It should contain:<jboss-app> <loader-repository>jboss.messaging:loader=ScopedLoaderRepository <loader-repository-config>java2ParentDelegaton=false</loader-repository-config> </loader-repository> </jboss-app>
-
6. Re: Configuring Destinations
ensonik Sep 13, 2006 10:18 PM (in response to timfox)Thanks for the help.
Unfortunately, doing this caused a nightmare of conflicting jar files (commons logging), so time not permitting me to fix it, I'm going to simply fall back to putting the file in the deploy directory. -
7. Re: Configuring Destinations
ovidiu.feodorov Sep 13, 2006 10:33 PM (in response to timfox)You can send me your ear (stripped off any proprietary/confidential code, if any), I can take a look at it.
-
8. Re: Configuring Destinations
ensonik Sep 22, 2006 8:38 PM (in response to timfox)Thanks for the offer.
When I get back into this, I might take you up on that offer. For now, we're satisfied enough with having the destinations file outside the ear as it's never really touched. -
9. Re: Configuring Destinations
peterj Sep 25, 2006 12:08 PM (in response to timfox)Ovidiu, I got the same error as Ensonik, though under different circumstances. I had a JAR file with a EJB3 MDB and a few other classes. One of the classes contained JMS client code. Once I removed the class with the client code, the class not found problem went away. If you are interested, I could send you the jar file.
Wierd thing is, though, none of my classes dealt with javax.jms.Queue (all used Topic), but Queue was the one that could not be found. -
10. Re: Configuring Destinations
ovidiu.feodorov Sep 25, 2006 10:20 PM (in response to timfox)Yes, please.
What EJB3 version are you using? -
11. Re: Configuring Destinations
peterj Sep 26, 2006 11:14 AM (in response to timfox)Ovidiu, I will email the zip file to you. I think I was using JBoss AS 4.0.5CR1 and JBoss Messaging 1.0.1CR4 (I encountered the problem at home but am now at work). I will verify the versions and let you know the exact version in my email.
-
12. Re: Configuring Destinations
peterj Sep 26, 2006 11:48 AM (in response to timfox)I just now found the root cause of the problem.
First, I am using JBossAS 4.0.5CR1 (whichever EJB3 implementation that comes with it). I am also using JBoss Messaging 1.0.1CR4 (haven't upgradded to CR5 yet).
The jar file I built contained client code and the MDB. And one other thing - a jndi.properties file. Once I removed the jndi.properties file, the EJB3 MDB deployed successfully. The jndi.properties contained the tpyical information for locahost:
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
So it does not appear to be a problem with the EJB3 or Messaging code, simply a packaging issue for my jar file. By the way, I reproduced the problem by adding the jndi.properties file to the mdb-example.ejb3 file generated by the ejb3mdb example.
Therefore, I will not be sending the jar file.
It might by nice, however, if the DLQHandler.createSevice method was modified to look for the class not found exception and generate an error that lets the user know to check the jar file for an extraneous jndi.properties file. Let me know and I will submit a proposed patch. -
13. Re: Configuring Destinations
ovidiu.feodorov Sep 26, 2006 1:44 PM (in response to timfox)I would rather add the conclusion to the FAQs. Please feel free to create an entry and post your conclusion there: http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMessaging
-
14. Re: Configuring Destinations
ovidiu.feodorov Sep 26, 2006 2:40 PM (in response to timfox)PeterJ wrote:
First, I am using JBossAS 4.0.5CR1 (whichever EJB3 implementation that comes with it).
I expanded the "stock" 4.0.5.CR1 release (this is what I used for the release smoke tests) and I don't see any default EJB3 installation. Have you used the installer?