How to migrate an application using the JBoss EAP EJB Legacy Client BOM to EAP 8
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 8.x
Issue
- How to migrate an application using the JBoss EAP EJB Legacy Client BOM to EAP 8
Resolution
App Migration Issue(s) Description
The JBoss EAP EJB Client Legacy BOM, with Maven groupId:artifactId coordinates org.jboss.eap:wildfly-ejb-client-legacy-bom, is no longer provided with JBoss EAP 8.
What happens if the app is migrated to EAP 8 without any change (e.g. deploy fails, unable to debug, maven build fails)?
The customers may continue to use the same version of the removed BOM for their standalone Java apps to interop with JBoss EAP 8, but it is strongly recommended to replace usage of the deprecated EJB Client Legacy API, as noted by Deprecated in Red Hat Enterprise Application Platform (EAP) 7 EJB section.
How to identify the App Migration issue(s) in an app (e.g. pom.xml has dependency foo:bar, import/usage of java package/class)?
A Maven project (pom.xml) imports the “JBoss EAP EJB Client Legacy” BOM on its dependency management.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.bom</groupId>
<artifactId>wildfly-ejb-client-legacy-bom</artifactId>
<version>${version.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
Once the issue is identified, which changes may be done to the app to solve the issue (e.g. replace maven dependency, use new API)?
N/A
The EJB Client API ConfigBasedEJBClientContextSelector configuration method was deprecated in EAP 7.1, when the simplified configuration capability was introduced. These legacy classes were moved into the jboss-ejb-client-legacy.jar which was made available in maven [1] for standalone java applications to use and these classes no longer existed in the EAP 7.1+ jboss-ejb-client.jar:
- org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector
- org.jboss.ejb.client.ContextSelector
- org.jboss.ejb.client.EJBClientConfiguration
- org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration
Only standalone java applications should use the jboss-ejb-client-legacy.jar, applications running in EAP 7 can communicate with EAP 8 and EAP 8 to EAP 7 with the jboss-ejb-client.jar used in the EAP instance.
Standalone applications using the EAP 7.4 jboss-ejb-client-legacy.jar [1] can continue to use it to talk to EAP 8, but it is recommended when possible to update the standalone client application and migrate it to use the simplified configuration method as shown in [2].
This content is not included.[1] This content is not included.https://maven.repository.redhat.com/ga/org/jboss/jboss-ejb-client-legacy/
[2] How configure an EJB client in EAP 7.1+
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.