-
1. Re: Recommended way to created administered topics/queues wi
ataylor Sep 1, 2009 6:36 AM (in response to thammoud)You can predefine queues and topics via the hornetq-jms.xml file and ship these with your war file or ue the management interface to create them, see http://hornetq.sourceforge.net/docs/hornetq-2.0.0.BETA5/user-manual/en/html_single/index.html#management
-
2. Re: Recommended way to created administered topics/queues wi
thammoud Sep 1, 2009 1:47 PM (in response to thammoud)Thanks Andy for your quick reply. When you say "ship these with your war", do you mean as separate entities or you do have a way to embed them in the war.
I tried to embed the hornetq-jms.xml that contains our destinations in our META-INF section of the .sar file and that did not work. The only way for it to work for us, was to define the destinations in the hornetq.sar/hornetq-jms.xml. It will be nice for it to work by reading the contents of the sar and bind the entries to JNDI.
On a second note, MDB destinations, while created are not bound to JNDI. perhaps that is by design.
Again, thanks for your help. -
3. Re: Recommended way to created administered topics/queues wi
ataylor Sep 2, 2009 3:12 AM (in response to thammoud)HornetQ will pick up the hornetq-jms.xml file from anywhere on the classpath, so whether you use a sar, ear, war just make sure it is available. I'm sorry i can't remember which locations for each are added to the contexts classpath but I'm sure you'll figuret hat out :)
-
4. Re: Recommended way to created administered topics/queues wi
thammoud Sep 2, 2009 8:46 AM (in response to thammoud)Simple enough. Included my destinations file in the ear root and was picked up and deployed correctly. So basically I had one in the hornet-sar/ with the connection factories and one in the ear file with my destinations. I also tried including everything in the ear file (Connection factories and destinations) and that also deployed just fine.
However, anything defined in the ear embedded file is being undeployed by the FileDeploymentManager. Don't know why yet. -
5. Re: Recommended way to created administered topics/queues wi
ataylor Sep 2, 2009 9:01 AM (in response to thammoud)However, anything defined in the ear embedded file is being undeployed by the FileDeploymentManager. Don't know why yet.
so are you saying it gets deployed and then undeployed, or just not deployed? -
6. Re: Recommended way to created administered topics/queues wi
thammoud Sep 2, 2009 9:27 AM (in response to thammoud)Deployed and then they all disappear from JNDI. Under the debugger, if I leave a breakpoint in the run() of the FileDeploymentManager, everything stays in JNDI and works perfectly. As I said, I have it under the debugger so I will try to see why it is undeploying them.
-
7. Re: Recommended way to created administered topics/queues wi
thammoud Sep 2, 2009 9:41 AM (in response to thammoud)I think that I have the issue:
pair.a.getFile() is returning:
/opt/jboss/jboss-5.1.0.GA/server/all-with-hornetq/deploy/FinancialDataServer.ear/hornetq-jms.xml.
The URL inside pair.a is set to:
vfszip:/opt/jboss/jboss-5.1.0.GA/server/all-with-hornetq/deploy/FinancialDataServer.ear/hornetq-jms.xmlif (!new File(pair.a.getFile()).exists()) <==== Fails since the file does not physically exist. { try { Deployer deployer = entry.getValue().deployer; log.debug("Undeploying " + deployer + " with url" + entry.getKey()); deployer.undeploy(entry.getKey().a); toRemove.add(entry.getKey()); } catch (Exception e) { log.error("Error undeploying " + entry.getKey().a, e); } }
-
8. Re: Recommended way to created administered topics/queues wi
ataylor Sep 2, 2009 9:52 AM (in response to thammoud)good catch, could you raise a jira for it and link to this thread?
-
10. Re: Recommended way to created administered topics/queues wi
jmesnil Sep 22, 2009 5:30 AM (in response to thammoud)"thammoud" wrote:
I think that I have the issue:
pair.a.getFile() is returning:
/opt/jboss/jboss-5.1.0.GA/server/all-with-hornetq/deploy/FinancialDataServer.ear/hornetq-jms.xml.
The URL inside pair.a is set to:
vfszip:/opt/jboss/jboss-5.1.0.GA/server/all-with-hornetq/deploy/FinancialDataServer.ear/hornetq-jms.xml
I can't reproduce your issue.
When I deploy the ear as a directory, the URL is:vfsfile:/Users/jmesnil/RedHat/Work/jboss-5.1.0.GA/server/default-with-hornetq/deploy/test.ear/hornetq-jms.xml
and it works fine (note that the URI scheme is vfsfile in my case, not vfszip).
I need to check it works with vfszip too. How do you deploy your EAR? -
11. Re: Recommended way to created administered topics/queues wi
thammoud Sep 24, 2009 6:27 AM (in response to thammoud)Unexploded under deploy directory.
-
12. Re: Recommended way to created administered topics/queues wi
jmesnil Oct 1, 2009 9:23 AM (in response to thammoud)Hi tarek, I have fixed the bug to make sure the resources are not undeployed when they are in a unexploded EAR.
-
13. Re: Recommended way to created administered topics/queues wi
thammoud Oct 1, 2009 11:00 AM (in response to thammoud)Downloaded and tested it. Looks good. Thanks for the fix. keep up the great work on this product.