Does ActiveMQManagedConnection (EAP/AMQ) support Autoclosable? - autocloseable

I am using:
openshift
AMQ (seems to be a forked activemq-5.11.0.redhat...... version)
EAP 7.2.3
While local debugging I get as Connection some ~ConnectionProxy with a physical ActiveMQManagedConnection
Can I use "try-with-resources"?
I am not sure and think no ... because ActiveMQManagedConnection 5.11.0 (I dont know what redhat has changed) doesnt implement Autoclosable. Neither does the implemented javax.resource.spi.ManagedConnection
https://github.com/apache/activemq/blob/activemq-5.11.0/activemq-ra/src/main/java/org/apache/activemq/ra/ActiveMQManagedConnection.java#L53
I havent found the source of this EAP ConnectionProxy. Maybe it has Autoclosable.

If you're using Red Hat AMQ 6 on OpenShift (which is based on ActiveMQ 5.x) then you're stuck on JMS 1.1. The javax.jms.Connection in JMS 1.1 doesn't extend java.lang.AutoCloseable. Red Hat AMQ 7 (based on ActiveMQ Artemis) implements JMS 2 and the javax.jms.Connection in JMS 2 does extend java.lang.AutoCloseable.
Red Hat JBoss EAP 7.2.3 ships with ActiveMQ Artemis so if you're using that (along with its JCA resource adapter) then you can use try-with-resources. However, if you've configured a JCA resource adapter for integration with a broker based on ActiveMQ 5.x then you can't.

Related

Is it possible to connect to an old Kafka version (like 0.11) using new versions of spring-kafka like v2.5.4.RELEASE?

I constructed a spring boot application to produce data in a Kafka, but now I need to connect this application to an old Kafka (0.11v). I tried just changing the bootstrap-server, but I receive connection errors.
I doubled checked if this Kafka instance is working, and other applications are connecting.
My question is if a new version of spring-Kafka like v2.5.4.RELEASE can connect to an old version of Kafka. Is there any configuration I can add to use legacy Kafka instances? I constructed a spring boot application to produce data in a Kafka, but now I need to connect this application to an old Kafka (0.11v). I tried just changing the bootstrap-server, but I receive connection errors.
I doubled checked if this Kafka instance is working, and other applications are connecting.
My question is if a new version of spring-Kafka like v2.5.4.RELEASE can connect to an old version of Kafka. Is there any configuration I can add to use legacy Kafka instances?
In general, yes, as long as you don't use features provided by the newer brokers.
Backwards compatibility for the Java clients has been pretty good since 0.10.2.x.
There is a compatibility matrix here but it hasn't been updated since the 1.0.0 clients.
SK v2.5.4 uses the 2.5.0 clients (2.5.5 uses 2.5.1). I haven't tried connecting to such an old broker lately, what is the nature of the connection errors?
EDIT
I just ran a Boot app using Spring Kafka 2.5.5 against an 0.11.0.3 broker with no problems.

EJB support in Websphere Traditional vs Liberty

I am working on a project where we are planning to use WLP (WebSphere liberty) instead of traditional WAS.
The code is having ejb modules (ejb 2 and 3) for different components.
EJB client of one component is used by some other components to talk with the EJB server module.
I know that liberty has some ejb features. But does liberty have same level of support/features for EJB as available in WAS 9?
What are the limitations/issues of using EJB with liberty ?
WebSphere v9 and WebSphere Liberty both support the full EJB 3.2 specification (which includes back level support for EJB 1 & EJB 2). However, there are some limitations in WebSphere Liberty when it comes to supported optional features and extensions that go beyond the EJB specification. The current limitations in WebSphere Liberty compared to WebSphere v9 are:
Entity beans : Liberty does not support the optional 2.x / 1.x CMP/BMP Entity Beans API group.
JAX-RPC Web Service Endpoints : Liberty does not support the optional JAX-RPC WebService Endpoints API group. (JAX-WS Endpoints are supported)
Update: New in January 2022, a Maven/Gradle conversion tool is available to migrate JAX-RPC applications to JAX-WS. See the following blog post and documentation for details.
Embeddable EJB Container : Liberty does not provide an implementation of the optional Embeddable EJB Container API group.
Transaction propagation : Liberty does not support outbound or inbound transaction propagation for remote EJB methods. Transactions are propagated within the server process, but not from a client or with another server process.
EJB Thin Client support : Liberty does not provide an EJB thin client, though does support use of the WebSphere v9 EJB thin client. Liberty does provide the full Java EE application client. Also, Liberty does not provide tooling to manually generate EJB stub classes for use with a thin client, though stubs generated with either RMIC (EJB 2.x/1.x) or the createEJBStubs command (EJB 3.x) from WebSphere v9 are supported.
Custom JNDI names : Liberty does not support binding EJBs into JNDI using custom names (from ibm-ejb-jar-bnd.xml). EJBs are made available in the specification defined locations in java:global, java:app, and java:module. Note: this support is in development, and you may follow the progress as detailed here : https://github.com/OpenLiberty/open-liberty/issues/7918
Update: Now available starting with Liberty 20.0.0.12.
Persistent timer failover : Liberty does not support failing over EJB persistent timers to other server instances. Note: this feature is in development (and currently in beta), and you may follow the progress as detailed here :
https://github.com/OpenLiberty/open-liberty/issues/7774 Update: Now available starting with Liberty 20.0.0.5.
Stateful session failover : Liberty does not support failing over the state of Stateful session beans to other server instances.
WLM : Liberty does not provide capability similar to the Workload Management support available in WebSphere v9 for remote EJB calls.
PMI : Liberty does not support the WebSphere Performance Monitoring Infrastructure that is provided on WebSphere v9.
Local optimization for remote EJB interfaces : Remote EJB calls within the same server process are not optimized, they will go through the full RMI/IIOP stack.
EJB MDB support for listener ports : Liberty supports using Activation Specs with message-driven beans.
Based on the description of your application, you may have issues with the use of EJB remote interfaces, due to the lack of support for transaction propagation, an EJB thin client, and WLM. You may want to consider exposing those beans as Webservice Endpoints instead (#WebService). Also, if the application uses custom JNDI names, like ejb/ABean or ejblocal:ABean, then you would need to switch those to looking up the beans using the specification defined locations such as java:global/<app>/<module>/ABean!<interface>.

Connection with MQClient 7.5.0 and SHA2

I have a "blackbox" application written in Java that connects to MQ. On unix server there is MQ Client installation version 7.5.0. Java application is using 1.7.0_79. I have to use SSL_RSA_WITH_AES_256_CBC_SHA256 to make the connection.
I cannot upgrade to MQ Client v8. I am not entirely sure if I can connect having MQ Client version 7.5.0 and for instance use SSL_RSA_WITH_AES_256_CBC_SHA256.
Would be that even possible to establish connection having these components ?
IBM added support for non-IBM Java cipher suite names via APAR IV66840, this was included in MQ v7.5.0.5.
What you are asking should be possible if you have the following:
Set this java system property
-Dcom.ibm.mq.cfg.useIBMCipherMappings=false
or
System.setProperty("com.ibm.mq.cfg.useIBMCipherMappings", "false")
Use cipher suite value TLS_RSA_WITH_AES_256_CBC_SHA256.
Note does not start with SSL_ for Oracle java.
Make sure the strong cryptographic provider is enable in java to support ciphersuites with AES256 encryption. It appears that if you upgrade to a higher level of java 7 (1.7.0_161 for example) this will be included and enabled by default.
Use a JKS keyStore.

Activemq network with different server versions

I have an activeMQ network with 2 instances. Those 2 instances are running 5.5 version of activeMQ. I want to add a new server in 5.9 version. Is this feasible? What should I have in mind? Any gotchas?
Thanks.
We don't test the network of brokers between versions. It may work but we encourage users to upgrade all their brokers to the latest release once the messages contained in those broker's stores have been migrated to a new broker. You can do this by networking an older broker to a newer one and then creating a subscription on any destination that has messages on the old broker on the new one and letting the demand drain the old broker.

What tools do you use to implement SOA/Messaging?

NServiceBus and MassTransit are two tools that can be used to implement messaging with MSMQ and other message queues.
I find that once you start using messaging to have applications talk to each other, you don't really want to go back to the old RPC style.
My question is, what other tools are out there? What tools do you use?
Apache ActiveMQ is probably the most popular and powerful open source message broker out there with the most active open source community behind it as well as commercial support, training and tooling if you need it.
One of the more interesting aspects of ActiveMQ is its wide support for a large number of different language bindings and transport protocols
WebSphere Message Broker is IBM's flagship ESB which runs ontop of MQ.
They also produce WebSphere ESB which is a slightly lighter offering which specialises in ESB across web services.
We use WCF services for synchronous message based operations, and nServiceBus for anything asynchronous.
Rogue Wave is very popular [ http://roguewave.com/products/hydra/ ]
So are IBM's Websphere offerings [ http://en.wikipedia.org/wiki/Mqseries ]
WCF is extremely powerful and should be looked into by anyone in the .NET space starting up a message based system.
I would recommend against BizTalk unless you can make a lot of use out of it's adapters (ie. you have a lot of old systems to communicate with).
Nuedesic makes a great WCF based ESB, Neuron, if you are willing to pay a bit.
I use IBM software stack because it has the widest set of features (pub/sub, async, sync) and platform support (60+ combination of platform, languages) and also a great set of free tools provided by IBM
For Operations, I use use the linear log rotation IBM WebSphere MQ supportpac
For development and testing, I like RFHUTIL to generate fake cobol, java, MS objects, other binary and text objects and SOAPUI to invoke HTTP web services. If I need to invoke MQ based web services, I go back to RFHUtil. Of course Websphere MQ Explorer for admin.
We use the old WebSphere Message Broker 6.1 (now IBM Integration Bus) that is fast and reliable once you are acquainted.

Resources