-
1. Re: Configuring Destinations
timfox Feb 21, 2007 10:54 AM (in response to apk2072)You can create destinations programmatically using the ServerPeer MBean interface.
So I guess you could write a program that read the data from the database and called the mbean server to create the destinations. -
2. Re: Configuring Destinations
clebert.suconic Feb 21, 2007 12:30 PM (in response to apk2072)*I guess * it would be nice if the next JMS spec version could add an Admin API.
-
3. Re: Configuring Destinations
timfox Feb 21, 2007 12:35 PM (in response to apk2072)Next JMS spec? :D
Don't hold your breath, JMS has been frozen for years. (since 2002 to be precise). -
4. Re: Configuring Destinations
timfox Feb 21, 2007 12:53 PM (in response to apk2072)IIRC JMS is basically a LCD (lowest common denominator spec) that was basically written to unify the two forms of messaging prevalent at the time by the two main messaging providers- fast non persistent publish subscribe - as used by Tibco and point to point queues as used by IBM MQ series. I believe the spec was basically written by IBM.
I think you'll have an extraordinarily hard time getting agreement on another JMS spec. -
5. Re: Configuring Destinations
apk2072 Feb 22, 2007 9:38 AM (in response to apk2072)"timfox" wrote:
You can create destinations programmatically using the ServerPeer MBean interface.
So I guess you could write a program that read the data from the database and called the mbean server to create the destinations.
Tim, Thanks for the feedback, do you have any such samples?
-APK -
6. Re: Configuring Destinations
timfox Feb 22, 2007 9:58 AM (in response to apk2072)There should be plenty of examples of how to call an MBean operation on the jboss wiki.
-
7. Re: Configuring Destinations
apk2072 Feb 22, 2007 3:48 PM (in response to apk2072)I found some sample in examples folder. Here is the piece of java code, which works good.
public static void deployQueue(String jndiName) throws Exception
{
System.out.println("Deploying the queue - " + jndiName);
MBeanServerConnection mBeanServer = lookupMBeanServerProxy();
ObjectName serverObjectName = new ObjectName("jboss.messaging:service=ServerPeer");
String queueName = jndiName.substring(jndiName.lastIndexOf('/') + 1);
mBeanServer.invoke(serverObjectName, "createQueue", new Object[] {
queueName, jndiName }, new String[] { "java.lang.String","java.lang.String" });
System.out.println("Queue " + jndiName + " deployed");
} -
8. Re: Configuring Destinations
ovidiu.feodorov Feb 22, 2007 6:03 PM (in response to apk2072)Yep, totally forgot about that ...
It's worth running the examples, yes :)