How to setup JMS bridge to ActiveMQ on Weblogic 11g - java

I'm novice guy in JCA and JMS parts of Java EE stack, and now I'm struggling with JMS bridge configuration between two JMS providers (ActiveMQ 5.9.1 -> Weblogic 11g 10.3.5), and I need some help to understand all the moving parts and required configuration elements.
What I've done already:
JMS server configured on Weblogic 11g node
Configured Foreign Server - AMQ connection factory, and source queue objects bound to the local JNDI (OK: conn. factory and queue objects visible in server jndi tree)
Create JMS Bridge with default props (OK - I think)
Created the Bridge Destination for target destination (Weblogic) with default configuration - where possible (OK: Resource Adapter deployed)
Created the Bridge Destination for source destination (AMQ) - JNDI properties, default props where possible (FAIL - Cannot connect to the source destination)
And there is the question:
By default there are two resource adapters (XA, non-XA), do I need install the AMQ specific resource adapter?
I've assumed that yes, so I've downloaded rar file on Weblogic machine, then tried to install with Weblogic Console (Deployment -> Install), but.. another trouble - no way to achive Running state in Deployments view. I've read that all jars from rar need to be placed in Weblogic CLASSPATH, so I've copied them to Weblogic lib directory. But, with no success so far.
So, what I did wrong, where is the gap or an error in this configuration?
I have studied the Oracle documentation, but I feel still didn't get the complete understanding of the bridge config :((
Any explanatory replies very appreciated!!!

Ok, problem solved. I've used wrong JNDI names of connection factory and queue - local names defined in Foreign Server configuration instead of names on remove JMS server.
Actually, no additional configuration like Foreign Server, or Resource Adapter is needed here.

Related

How can one modify the **max-beans-in-free-pool** property for a given MDB via the Weblogic 10.3.1.0 Console?

How can one modify the max-beans-in-free-pool property for a given MDB via the Weblogic 10.3.1.0 Console ? I know this can be added in weblogic-ejb-jar.xml configuration file, but want to do this via Weblogic Console.
It doesn't have that feature Admin Console in 10.3.1, not sure for later versions of WLS.
According to WebLogic documentation, it defines a free pool size for EJBs and it's also a property which you could configure your MDB but only using the ejb-jar.xml file and there's no way to do this in the console because it's something that belongs to the application.
Here there is a set of possibles attributes to configure the MDB with annotations or only in the ejb-jar file for Weblogic

Does JMS require hsqldb files in jboss 5.x?

I am trying to remove hsqldb files from the jboss server as part of server security. After removing I can't deploy my project while deploying it
throws queue not bound exception.
Which is normally due to jms queue.
Does JMS queue depends on hsqldb?
If so is there any workaround.
JMS in JBossAS 5.x (and older) uses a DataSource to store messages. By default, this points at the standard hsqldb one that is configured.
If you remove the hsqldb DataSource you will need to either:
Replace it with your database
Remove the standard JMS queue & topic configurations
I think you will find that this AS also uses that DataSource for persisting EJB timers.

ActiveMQ 5.1.1 WebSphere 8.5.5 Activation Spec configuration?

Thanks to Maarten I was able to get basic ActiveMQ JMS topics and connection factories working in WAS. He has a nice write up in his reply to this topic: ActiveMQ 5.11 with WebSphere Application Server 8.5
But I cannot find a way to define any ActiveMQ JMS Activation Specs in the WAS admin console. And of course I need those in order to trigger my MDBs. ActiveMQ simply doesn't show up as a JMS provider when creating a new AS.
How do I configure Activation Specs in WAS using ActiveMQ as the provider? Am I missing a jar file?
activemq-client-5.11.0.jar
hawtbuf-1.11.jar
slf4j-api-1.7.10.jar
If you want to use Activation specification, you need to install ActiveMQ as JCA 1.5 compliant resource adapter. As far as I know, ActiveMQ provides resource adapter as separate install.
See also:
Deploying the ActiveMQ Resource Adapter into IBM WebSphere
Managing messaging with a third-party JCA 1.5 or 1.6-compliant messaging provider
ActiveMQ resource adapter
Listener ports are stabilized, and should only be used if provider doesn't support JCA.
Really straight forward once you understand (of course).
From the IBM Redbook mentioned above, sg247770.pdf, we need to configure ActiveMQ as a Generic JMS provider in WAS. And since we want to use Activation Specs, again from the Redbook, we need to use the ActiveMQ Resource Adapter, or rar file. There is a link on the ActiveMQ page to the latest rar, I don't need to provide it here. Once the rar is installed, using the WAS Console/Resources/Resource Adapters menu, you can configure J2C CFs, ASs, and administered objects including Queues and Topics from the rar configuration page. These will all have custom properties where you will enter your destinations, etc.

Application Name for the connections to WebSphere MQ on z/OS

Using WebSphere MQ on z/OS for messaging and the WebSphere MQ resource adapter within JBoss EAP 6, I want to set the Application Name that appears when viewing the active handles on a queue.
The default is WebSphere MQ Client for Java and I have not managed to change it. I have no administrative access to the queue / queue manager, I am just the sender posting messages to it.
My configuration for the queues / queue manager are located in the JBoss EAP config file at the resource adapter configurations. I have tried - without success - setting the application name using a config-property inside the connection definition, for example:
<config-property name="PutApplName">
my application name
</config-property>
I have also tried names like applicationName, applName, appName, application or JMS_IBM_MQMD_PutApplName. The latter and the name from the example I have taken from here and here.
How can I change the displayed application name?
Is this even possible without using the specific WebSphere MQ classes inside the java application?
http://pic.dhe.ibm.com/infocenter/wmqv7/v7r5/index.jsp?topic=%2Fcom.ibm.mq.dev.doc%2Fq030790_.htm
Somewhere buried in there, it says its not supported for z/OS.
Note: Queue managers running on z/OSĀ® platforms do not support setting
application names.

Best way to configure a Java enterprise application

I have a set of EJBs and other Java classes which need to be configured differently based on the system environment in which they are deployed: production, test, or lab. The configuration information includes stuff like URLs and database connection information.
We'd like to deploy the same exact product (EAR file) in each environment, and have the code then figure out where it is and what its configuration should be, without having to reach out to each deployment server in each environment to make changes.
What is the best way to configure all these components in a centralized, reliable, easy-to-maintain fashion?
Thanks for your thoughts.
The best, IMHO, is to use JNDI entries.
You may have to recode some parts of your application in order to use theses entries instead of plain vars, but with this setup:
Configuration is server-independant: each vendor provides its own implementation, but spec is a standard.
In a clustered environment, config can be persisted in a cluster-wide JNDI tree (see JBoss)
Configuration can be changed thru webadmin without restarting server.
How database connection pool information is stored / configured depends on the app server vendor. Put other variable stuff in property files on the classpath.
If you are deploying the exact same EAR to three different instances of a certain container than you will have to edit the deployment settings as there is no way that the deployment process could have any idea about which one of your three versions you would like to use at a particular deployment.
Deployment settings should go into JNDI entries as Piere-Yves said above.
If I were you, I would have my deployment-script (Ant?) properly populate the JNDI entries depending upon which environment you are deploying to.

Categories

Resources