I am new to both JMS and WebLogic, and I can't seem to figure out how to properly run my JMS solution in WebLogic. I have developed my proof-of-concept with Active MQ, but the application will eventually need to run on WebLogic.
Active MQ allowed me to create Topics dynamically, by simply calling createTopic() on TopicSession. If the Topic doesn't exist, it is created, which is exactly what I need. I can't figure out an easy way to do this in WebLogic. I know that createTopic() won't work as per the documentation:
Note: The createQueue() and createTopic() methods do not create destinations dynamically; they create only references to destinations that already exist.
For information about creating destinations dynamically, see Chapter 7, "Using JMS Module Helper to Manage Applications."
I am aware that there is a `JMSModuleHelper` class, but the javadoc says the following:
Note: Oracle recommends that the use of the create (distributed)queue/topic methods be strictly limited, as they directly modify the associated
JMS Module configuration (your-jms.xml) file and provide minimal feedback for detecting success or failure.
In addition to this warning, the usage of this class involves complex manipulation of MBeans and requires the knowledge of which server my application is running on. This is very inconvenient, since my app will be deployed to multiple servers based on the desired environment (ie. Integration Test, System Test, UAT, Prod, etc).
Is there really no easy way to use dynamic Destinations in WebLogic?
This makes me wonder if my entire JMS based design might be misguided... The idea is that I have 5 different applications, but these applications share a large user base among themselves. These users have consistent IDs among the applications. Some events within any of the applications trigger a JMS message that is broadcast to a Topic with a name derived from the currently logged in USER_ID. Every time a user logs into any of the apps, the app subscribes to that USER_ID_Topic, with the application name being the Subscription ID. This way the message is broadcast to all users when they log in to any of the 5 applications, yet there is a well defined, centralized Topic for all applications to push their user events into.
Is there a way to do this in WebLogic, or is this a bad approach?
Any advice would be appreciated!