Publish `com.ibm.mq.jakarta.connector.jar` in Maven Central
The RAR published in https://mvnrepository.com/artifact/com.ibm.mq/wmq.jakarta.jmsra/9.4.2.0 contains a com.ibm.mq.jakarta.connector.jar that isn't published in Maven Central.
Some integrations (like Quarkus support for IBM MQ) depend on the Resource adapter classes to function properly, so I'd be really glad if that can be published under a com.ibm.mq:com.ibm.mq.jakarta.connector GAV
Apologies if this is not the correct tracker for this issue; let me know where I can file it
/cc @arthurbarr
/cc @ozangunalp
This has been discussed with the development team, and we'd appreciate some more information on why the com.ibm.mq.jakarta.connector.jar file needs to be available as a separate download. It’s designed to be used as part of the resource adapter and deployed inside an application server. It potentially also relies on other classes provided by the application server in order to work. It would be interesting to know if those classes are available in other environments such as Quarkus, as that might help us make a decision.
Ultimately, the best way to get this prioritized and into the development backlog, is to raise it as an "idea" on https://ideas.ibm.com
@arthurbarr thank you for your reply!
In Quarkus, we support running JCA adapters using the Quarkus IronJacamar extension. The integration requires access to the Resource Adapter classes.
I have developed a PoC using the extension and extracting the required JAR during the build here: https://github.com/gastaldi/quarkus-ibm-mq
Here is how the IBM classes are being used in the extension (MQResourceAdapterFactory.java):
package io.quarkiverse.ibm.mq.runtime;
import java.util.Map;
import javax.transaction.xa.XAResource;
import jakarta.jms.ConnectionFactory;
import jakarta.jms.Message;
import jakarta.jms.MessageListener;
import jakarta.jms.XAConnectionFactory;
import jakarta.resource.ResourceException;
import jakarta.resource.spi.ActivationSpec;
import jakarta.resource.spi.BootstrapContext;
import jakarta.resource.spi.ManagedConnectionFactory;
import jakarta.resource.spi.ResourceAdapter;
import jakarta.resource.spi.ResourceAdapterInternalException;
import jakarta.resource.spi.endpoint.MessageEndpoint;
import jakarta.resource.spi.endpoint.MessageEndpointFactory;
import com.ibm.mq.jakarta.connector.ResourceAdapterImpl;
import com.ibm.mq.jakarta.connector.inbound.ActivationSpecImpl;
import com.ibm.mq.jakarta.connector.outbound.ManagedConnectionFactoryImpl;
import io.quarkiverse.ironjacamar.ResourceAdapterFactory;
import io.quarkiverse.ironjacamar.ResourceAdapterKind;
import io.quarkiverse.ironjacamar.ResourceAdapterTypes;
import io.quarkiverse.ironjacamar.runtime.endpoint.MessageEndpointWrapper;
@ResourceAdapterKind("ibm-mq")
@ResourceAdapterTypes(connectionFactoryTypes = { ConnectionFactory.class, XAConnectionFactory.class })
public class MQResourceAdapterFactory implements ResourceAdapterFactory {
@Override
public String getProductName() {
return "IBM MQ Resource Adapter";
}
@Override
public String getProductVersion() {
return "9.4.2.0";
}
@Override
public ResourceAdapter createResourceAdapter(String id, Map<String, String> config) throws ResourceException {
ResourceAdapterImpl adapter = new ResourceAdapterImpl();
return new ResourceAdapterWrapper(adapter, config);
}
@Override
public ManagedConnectionFactory createManagedConnectionFactory(String id, ResourceAdapter adapter)
throws ResourceException {
ResourceAdapterWrapper wrapper = (ResourceAdapterWrapper) adapter;
ManagedConnectionFactoryImpl factory = new ManagedConnectionFactoryImpl();
factory.setHostName(wrapper.config.get("host"));
factory.setPort(wrapper.config.get("port"));
factory.setQueueManager(wrapper.config.get("queue-manager"));
factory.setChannel(wrapper.config.get("channel"));
factory.setUserName(wrapper.config.get("user"));
factory.setPassword(wrapper.config.get("password"));
factory.setResourceAdapter(((ResourceAdapterWrapper) adapter).delegate);
return factory;
}
@Override
public ActivationSpec createActivationSpec(String id, ResourceAdapter adapter, Class<?> type, Map<String, String> config)
throws ResourceException {
ActivationSpecImpl activationSpec = new ActivationSpecImpl();
activationSpec.setResourceAdapter(((ResourceAdapterWrapper) adapter).delegate);
activationSpec.setUseJNDI(false);
//TODO: Set the properties
activationSpec.setDestination(config.get("destination"));
activationSpec.setDestinationType(config.get("destination-type"));
activationSpec.setUserName(config.get("user"));
activationSpec.setPassword(config.get("password"));
activationSpec.setQueueManager(config.get("queue-manager"));
activationSpec.setChannel(config.get("channel"));
return activationSpec;
}
...
}
FYI, the Quarkus IronJacamar extension is stable and being used by several customers already (by running Artemis JMS or by running custom JCA adapters accessing mainframes).
I believe that IBM MQ can be a great candidate to be integrated in Quarkus using the JCA connector, but I can't make it public unless the com.ibm.mq.jakarta.connector.jar is present in Maven central.
Thanks!
IBM Idea created: https://ideas.ibm.com/ideas/MESNS-I-840
Thank you for the quick reply, and for raising the official idea. The development team will be reviewing this.
+1 for this
Hi there,
Any news on this issue?
Hi, This is still under internal discussion. I shall provide an update in the near future.
Thank you.