Our current C# application does not use a username and password to connect to WebSphere MQ, rather a DLL contains all the security information. If this DLL exists, C# will be able to access MQ.
When connecting from Java or Scala, how would one configure JMS so that rather than using a simple user\password, like:
properties.put(Context.SECURITY_PRINCIPAL, "user")
properties.put(Context.SECURITY_CREDENTIALS, "password")
val ctx = new InitialContext(properties)
instead it uses the DLL?
Thanks
That DLL must be containing a security exit to be used by the MQ Client.
You should specify the security exit in the SECEXIT property of the MQConnectionFactory.
More about setting up the MQ classes for JMS to use the security exit:
https://www.ibm.com/support/knowledgecenter/SSFKSJ_8.0.0/com.ibm.mq.dev.doc/q032490_.htm?lang=en
Are you using a vendor solution or something home-grown for the security exits?
If it is a home-grown security exit then talk with the person in your company who wrote it.
If it is a vendor solution then contact the vendor for the Java client-side security exit. If you happen to be using Capitalware's MQAUSX solution then I known there is a Java & JMS client-side security exit plus the documentation describes how to configure it.
Related
In our project we have a requirement to connect to IBM IMS and get data. Many of the existing applications are done it through code more coupled with IMS.
In one of the application we are using Spring CCI support and providing the CCIConnectionFactory to the JDBCTemplate and using it in a relational (kind of) manner.
However we are building a new application which is not using Spring framework. We are making use of JAVA CDI and it's aspects. But to integrate it with IMS through CCI I can see Spring is the best option. Anyone have experienced on this CCI connections? What way is the best you think? And any other frameworks in Java you are familiar with - apart from Spring's support?
Appreciate your help and input.
I had the same question 5 Month ago and it was very hard to collect information about jca. If your project works with wildfly or jboss take a look on my inbound-ra-example project. At first you must know what kind of resource adapter (RA) you need, inbound or outbound. In short, an inbound RA acts as a server for external data and send the data to a message driven bean. An outbound RA is called from an EJB via a connection factory and initiate the connection to the external information system. Read the readme.md of my example project. The inbound RA is much more difficult as an outbound RA. Generate the skeleton of your ra with the ironjacamar codegenerator. I described the process in my example project.
I am developing a service for JMS messaging using IBM WMQ version 7.5 as Message oriented middleware. I am in a dilemma. The IBM specification says to use WebSphere MQ JMS API in JAVA EE environment. My sender and receivers will be in remote JBoss deployments. IBM provides a resource adapter to connect via JCA. This connection requires static administration of components such as Queue managers, queue channels, queue names.
Is JCA the best I can do ? Is there any other way where I can dynamically create the queues provided that I know other configuration details ? There will be multiple applications using this setup running on their own servers. If I use JCA, all have to make their own configurations. Can I make dynamic configurations ?
Typically within the application server environment resources would be created in some JNDI context. These would be Connection Factories and Destinations.
Depending on the app server, it may be possible to share this configuration across a network of individual servers. So typically there would be some set of static definitions.
However within say a servlet the MQConnectionFactory can be dynamically created.
In all cases the backing WMQ Resources do need to exist; though it is possible to send administrative command messages to WMQ to create queues and do other admin. The only exception is topics, accessing a topic string brings it into existence. Though this has default security properties that you might not want.
I'm trying to set up part of an application which uses MDBs to consume messages from a JMS Queue. I've looked through the Oracle documentation but can't seem to make sense of it. Examples on the internet seem to be for situations where your JMS server is the same weblogic server where you are consuming but in my case there is a separate server.
I've found this post Weblogic EJB connection to external Tibco EMS JMS Queue which gives broad strokes but seems to be written more for experienced weblogic users.
Specifically with the linked here is where I'm having trouble:
Create a foreign server with all the normal details (local/remote JNDI lookup names for destination and connection factories).
Not sure how to do this.
Create a local WL user with the same name as the remote EMS user, including password.
I cannot do this as my password is less than 8 characters
Create an ejb credential mapping (NOT security credential mapping)
do this by clicking on the relevant deployment, click on the relevant ejb name in the list, then Security tab then Credentials Mapping tab.
add the same name for WLS and Remote users (password doesn't seem to be necessary here).
Under Security I see Application/Module Scope tabs and Roles/Policies underneath those.
Can anyone give more detailed steps on how to set up a simple MDB in Weblogic 10.3.5 which consumes JMS messages from an external server (Tibco EMS)?
I have an ldap url, a selector (to filter out unwanted messages, not completely necessary), username and password, Queue name, EMS server url (which specifies a port), connection factory ldap. What do I do with this information?
You can configure a foreign server in weblogic and inside the foreign server you can provide the connection factory & destination details. The username, passwd & queue name that you have will be required to create these weblogic admin objects.
Weblogic foreign server configuration
While creating the destination you can provide the local jndi name which you can use in your MDB Activation configuration to connect to.
IBM Websphere documentation says that It's possible to use third-party jms providers: http://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.nd.doc%2Finfo%2Fae%2Fae%2Ftmj_instp.html
In oracle folder I've found resource adapter ojms.rar, but how to use it?
Maybe somebody uses WAS7 with AQ?
I haven't used OracleAQ myself, but here are links to the documentation; Since AQ is JCA compliant you may start with Managing messaging with a third-party JCA 1.5-compliant messaging provider. First step of this configuration is installing the resource adapter (ojms.rar).
Also, for sake of completeness, let me add that you may also access AQ using WebSphere Adapters. In this case, you don't configure AQ as JMS provider, but use the IBM suuplied adapter to access AQ, which acts as a client to your AQ and exposes AQ services to your applications in a JCA compliant fashion. You may find more information about this alternative at education assistant for WebSphere Adapter for Oracle E-Business Suite.
I recently tried to integrate Websphere with Oracle AQ and found one solution that works. I have explained how to do it in a Blog. http://itsolutionsarchitect.blogspot.com/
If you are still trying to get this to work, let me know if this helps.
If you're still looking for the answer, follow the steps to install the resource adapter using ojms.rar
Sadly `ojms.rar`` doesn't contain the classes required for installation.
Download mqjra.rar, extract it and take out gjra.jar from the extracted files.
Place gjra.jar inside your <WAS installation directory>\lib
Try to install the Resource adapter with ojms.rar
It'll get installed. Revert if you face issues.
I wrote a java client to connect to jms in websphere.
I was able to connect and produce and consume message.
Problem I am facing is when I do Session.createQueue(), websphere jms is not creating a new queue.
Please could some one throw some light on this issue...
Thanks in advance...
If you are working with WebSphere MQ as the messaging provider within WebSphere Application Server the queue will need to be created on the WebSphere MQ QueueManager first. This can be done either via the graphical WMQ Explorer or via the command line using the 'runmqsc' tool.
Information can be found for these via the WMQ InfoCentre - suggest doing a websearch for "WMQ Library" to get the latest link, currently though it is http://www-01.ibm.com/software/integration/wmq/library/index.html
Topics though don't need to be pre-created - though they can be if required. Various properties can be set different to the default.
If the Queue doesn't need to be permanent, for example as a temporary reply to then look into creating a temporary queue from the JMS Connection.
createQueue doesn't create a new queue. It simply creates a javax.jms.Queue object from a vendor specific identifier. javax.jms.Queue objects are just references to existing queues. Typically, you retrieve javax.jms.Queue objects from JNDI; createQueue is only useful in scenarios where using JNDI is not possible or not desirable.
Note: there is one exception to this, namely JMS providers that support autocreation of queues (I think ActiveMQ has such a feature).