I'm migrating an existing J2EE (EJB 2.1) web-application from JBoss EAP 5.1 (JBoss AS 5.1.0.GA) to EAP 6.2 (JBoss AS 7.3.0.Final).
The existing jboss-web.xml defines a dependency to the EJB jar by using the <depends> XML element. The jboss-web.xml looks like this:
<?xml version="1.0" encoding=UTF-8"?>
<jboss-web>
<depends>jboss.j2ee:module="myEJB.jar",service=EjbModule</depends>
</jboss-web>
JBoss 7.x does not support this <depends> XML element anymore. (You get a parse error during deployment, and validation fails against the XML schema).
How to migrate the jboss-web.xml <depends> behavior to JBoss 7?
Tried google, the JBoss EAP 6.2 migration guide, and searched/asked the JBoss Developer Forum without success. Couldn't find any resources / hints on migrating the above jboss-web.xml configuration.
Any pointers to documentation and other resources would be appreciated. (Or simply the solution.) Thank you!
Related
I couldn't see much on the Jboss documentation. Can I use wildfly version 26.0.1 and undertow 2.2.14. Or is there a better match for Jboss 7.4?
Thanks
TL;DR
If you need the application server, it is:
WildFly 23
If you need artifacts, this is for JBoss EAP 7.4.5:
Undertow 2.2.17.SP4-redhat-00001
WildFly Core 15.0.13.Final-redhat-00001
There is also a runtime BOM for the artifacts delivered with JBoss EAP.
https://mvnrepository.com/artifact/org.jboss.bom/eap-runtime-artifacts
Long version
As Doug Grove
already described, there is an article in the Red Hat Knowledgebase that lists the different JBoss EAP versions with the integrated components. However, starting from JBoss EAP 7.x, the component versions of only one non-described JBoss EAP patch version are listed per JBoss EAP minor version.
For JBoss EAP 7.4, the article states (as of 06/22/2022):
Undertow 2.2.5.Final
WildFly Core 15.0.2.Final
If you want to have the versions for all shipped artifacts of a specific JBoss EAP patch, Red Hat offers a Maven BOM file:
https://mvnrepository.com/artifact/org.jboss.bom/eap-runtime-artifacts
For JBoss EAP 7.4.5, it states:
Undertow 2.2.17.SP4-redhat-00001
WildFly Core 15.0.13.Final-redhat-00001
(Red Hat specific versions from the Redhat GA repository)
However, it is important to note, that the listed WildFly Core version is not the same as the WildFly application server version. If you compare the version of WildFly Core used in the WildFly 23 Undertow artifact with the one in the JBoss EAP Runtime BOM, you will notice that JBoss EAP 7.4 uses the same Core as WildFly 23 application server.
https://mvnrepository.com/artifact/org.wildfly/wildfly-undertow/23.0.2.Final
Or see the POM file of WildFly 23:
https://github.com/wildfly/wildfly/blob/23.0.0.Final/pom.xml#L473
Therefore JBoss EAP 7.4 corresponds roughly to WildFly 23.
Redhat lists components for JBoss EAP 7.4 as:
Undertow 2.2.5.Final
Wildfly Core 15.0.2.Final
Is that what you are looking for?
Since Drools 7.24.0, no .war file for EAP7 is shipped anymore. Any reason why? Can we use the Wildfly war file instead?
I am migrating from jBoss EAP 4.2 to 6.2 and stuck at migration of SSO simulator valve implementation.
In jBoss EAP 4.2, I have config(in server.xml) like this to simulate/push SSO and other properties in request header for localhost only.
<Valve className="com.xyz.xyz.xyz.xyz.SSOSimulatorValve" simFile="${jboss.server.home.dir}/lib/ssosim.properties" />
How should i migrate/configure this in jBoss EAP 6.2?
I was able to define the SSO Simulator valve in jBoss EAP 6.x using following in jboss-web.xml
<valve>
<class-name>x.y.z.SSOSimulatorValve</class-name>
<param>
<param-name>propFile</param-name>
<param-value>${jboss.server.base.dir}\lib\ssoSimulatorProperties.properties
</param-value>
</param>
</valve>
I am currently in the phase of migrating my Clustered Application from Jboss eap 5.1 to Jboss eap 6.1 (Jboss AS 7.1). The jboss eap 6.1 uses HornetQ as its JMS system as compared to Jboss eap 5.1 which used JBoss MQ as JMS system. My application has the requirement of using global and local JMS topics(distributed and non-distributed topics). On jboss eap 5.1, there is a configuration file in the messaging folder called 'xxx-destination-service.xml' which provided a boolean attribute called 'Clustered' defined for each of the JMS topics. This xml file and the attribute is no longer supported in jboss eap 6.1. Can anyone provide me pointers on how this can be done in jboss eap 6.1.
I am Clustering my application in Domain Mode on Jboss eap 6.1 . So please tell what configuration chnages need to be done in my domain.xml or any other xml file.
TIA for your help.
Ajit
While deploying my project on Redhat 6 with Jboss 4.2.3 I was having following difficulties so I decided to put it on stackoverflow so that it can help other people. If anyone could suggest a good title so that it can easily be searched, please
Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs?
Q: How to make Jboss scan specific path for WAR file scanning?
Q: How to bind Jboss with IP address rather then localhost?
Q: Where Jboss put exploded WAR file?
Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception.
java.lang.ClassCastException: org.hibernate.validator.event.ValidateEventListener cannot be cast to org.hibernate.event.PreInsertEventListener
Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max.
Q: How to change Servlet version of a Dynamic Web Project?
Q: How to make Jboss scan specific path for WAR file scanning?
Open $JBOSS_HOME/server/default/conf/jboss-service.xml
Add the path where you put your war after comma in the following tag. Suppose my war are pasted at /Oracle/my-web-apps
<attribute name="URLs">
deploy,/Oracle/my-web-apps <as many comma separated path for Jboss to scan war>
</attribute>
Q: How to bind Jboss with IP address rather then localhost?
Bind JBOSS with ip address so that you can access if with IP with following command
sh /Jboss/bin/run.sh -b 0.0.0.0
Q: Where Jboss put exploded WAR file?
Your WAR will be exploded at /Jboss/server/default/temp/deploy but please note on thing that deploy folder will only be visible when you run your Jboss server, because when you stop your Jboss server it undeploys all the projects.
Q: How to make Jboss 4.2.x to ignore old JSF libraries and use one within your project libs?
For this you don't need to change anything on JBoss side but in web.xml of your own project. Put following context-param and all done
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
Link: http://docs.jboss.org/jbossas/6/JSF_Guide/en-US/html/
Q: Hibernate-annotations conflict with Jboss 4.2.3 annotations and throwing following Exception.
Go to /jboss-4.2.3.GA/server/default/lib and copy hibernate-annotations.jar and replace it with your hibernate-annotations jar. Then again export and deploy project. Problem Solved. :-)
Q: How to run JSF 2.0.x on JBoss 4.0.x ? As JSF 2.0 supports at least Servlet 2.5 API and JBoss has Tomcat 5.x that can support Servlet 2.4 at max.
There is merely a difference of EL tags providing that you are not using any advance features of Servlet 3.0 like Async Support etc. Follow the steps below and You can run JSF 2.0 on Jboss 4.x
Link to Original Answer of this question --> https://stackoverflow.com/a/5998625/185022
JSF 2.0 depends heavily on EL 2.1 which is part of Servlet 2.5 and is a major change as opposed to EL 2.0 which is part of Servlet 2.4, but it does not depend on any particular Servlet 2.5 specific API. Servlet 2.4 should work as good. So in theory, you could get JSF 2.0 to work on Servlet 2.4 if you provide your own EL 2.1 API and implementation in /WEB-INF/lib. I did a quick test here on Tomcat 5.5.33 with the following libraries in /WEB-INF/lib:
el-api.jar file copied from lib folder of Tomcat 6.0.x
jboss-el.jar file (implements EL 2.1 and supports EL 2.2 like method invocation with arguments)
jsf-api.jar and jsf-impl.jar from Mojarra 2.0.x
And a Servlet 2.4 web.xml where the JBoss EL is been declared:
<context-param>
<param-name>com.sun.faces.expressionFactory</param-name>
<param-value>org.jboss.el.ExpressionFactoryImpl</param-value>
</context-param>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<context-param>
<param-name>com.sun.faces.validateXML</param-name>
<param-value>false</param-value>
A simple JSF 2.0 Facelet (not JSP!) with a simple <h:form> with a button with <f:ajax> and a simple #ViewScoped #ManagedBean works for me on Tomcat 5.5.33. Give it a try on your JBoss 4.0.5 and test it thoroughly.
Note that you need a minimum of JDK 1.5, not JDK 1.4. Also note that your application is this way unportable to any Servlet 3.0 container due to presence of the Servlet 2.5 specific el-api.jar file.
Q: How to change Servlet version of a Dynamic Web Project?
In Eclipse right click a project and go to properties and then click on Project Facet as shown in the image below if it will allow you to change then it's good otherwise there is a hack to do it.
If Eclipse doesn't allows you to do that then go to $ProjectWorkSpace/.settings/org.eclipse.wst.common.project.facet.core.xml and change the value of facet="jst.web" to 2.4 and also don't forget to change XML Schema for Servlet 2.4 in your Web.xml as shown below
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">