mq-container icon indicating copy to clipboard operation
mq-container copied to clipboard

Publish `com.ibm.mq.jakarta.connector.jar` in Maven Central

Open gastaldi opened this issue 9 months ago • 10 comments

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

gastaldi avatar Mar 11 '25 12:03 gastaldi

Apologies if this is not the correct tracker for this issue; let me know where I can file it

gastaldi avatar Mar 11 '25 12:03 gastaldi

/cc @arthurbarr

gastaldi avatar Mar 11 '25 15:03 gastaldi

/cc @ozangunalp

gastaldi avatar Mar 12 '25 14:03 gastaldi

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 avatar Mar 13 '25 17:03 arthurbarr

@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!

gastaldi avatar Mar 13 '25 20:03 gastaldi

IBM Idea created: https://ideas.ibm.com/ideas/MESNS-I-840

gastaldi avatar Mar 13 '25 20:03 gastaldi

Thank you for the quick reply, and for raising the official idea. The development team will be reviewing this.

arthurbarr avatar Mar 14 '25 08:03 arthurbarr

+1 for this

phillip-kruger avatar Aug 07 '25 22:08 phillip-kruger

Hi there,

Any news on this issue?

ddefrancesco avatar Nov 07 '25 13:11 ddefrancesco

Hi, This is still under internal discussion. I shall provide an update in the near future.

Thank you.

ShashikanthRaoT avatar Nov 13 '25 04:11 ShashikanthRaoT