-
1. Re: Dynamic queue creation and deletion
mark30000 Mar 17, 2002 5:31 AM (in response to mark30000)By now I've found the hack that solves the problem,
but its probably not the best solution here.
MBeanServer server = (MBeanServer)
MBeanServerFactory.findMBeanServer(null).iterator().next();
JMSServer jmsServer = (JMSServer) server.invoke(
new ObjectName("JBossMQ",
"service",
"Server"),
"getJMSServer",
new Object[]{},
new String[]{});
jmsServer.deleteTemporaryDestination( null,
new SpyQueue(queueName) );
The main problem is that I have to explicitly use JBoss classes - my code becomes application server dependent.
May be you know some other solution to the problem?
May be there is a patch to the bug? -
2. Re: Dynamic queue creation and deletion
adrian.brock Mar 17, 2002 7:32 AM (in response to mark30000)Have a look at the spec, section 5.2
I don't think you would appreciate the comment
"Since most clients use statically defined queues, this is not a problem"
On your specific code,
don't use invoke() to get an MBean's attribute, in
your case "JMSServer".
It only works because of a bug in Sun's MBeanServer,
which is likely to plugged very soon.
You should use server.getAttribute() instead.
I've already fixed this problem in JBossMQ source for 3.0
Regards,
Adrian -
3. Re: Dynamic queue creation and deletion
mark30000 Mar 17, 2002 11:09 AM (in response to mark30000)Thank you for the tip about the bug.
Changed the code to getAttribute() method - works fine.
About the JBossMQ 3.0 - is there some way to "plug" it into
JBoss 2.4.4 version?
Is JBossMQ 3.0 a stable package or under massive development?
Sometimes I get errors about OIL Client connection already closed -
its look like some race condition but I don't have a clue how to
solve it. May be you can point me to some direction.
Thank you in advance, Mark. -
4. Re: Dynamic queue creation and deletion
adrian.brock Mar 17, 2002 12:20 PM (in response to mark30000)Sorry,
I don't really do much work on JBossMQ.
I know JAAS security was recently added and of course
there's clustering in 3.0
You might want to report your problem as a bug.
If it's fixed in 3.0, it might be possible to apply the
fix to 2.4.5, the next maintenance release for the
2.4 branch.
Regards,
Adrian -
5. Re: Dynamic queue creation and deletion
pra Mar 18, 2002 2:45 AM (in response to mark30000)Not to long a goo (one week) I announced the availability of a compat package - a backpatch of 3.0 to 2.4 that I wanted people to test - but no onehas shown any interest in it.
//Peter -
6. Re: Dynamic queue creation and deletion
jaywright00 Mar 19, 2002 5:25 PM (in response to mark30000)
Where is everyone accessing the org.jboss.mq.pm classes from? I'm using jboss2.4.4 and I do not have access to these classes. I am trying to turn off persisted queueing for at least one of my message queues.
Is there a place to get this source code?