What should be done for deploying EJB 2.1 in Jboss AS 6.0 - jboss6.x

What is the configuration one has to do for deploying EJB 2.1 in Jboss AS 6.0?
Kindly refer to links, if there are any.

There should not be any explicit configuration needed. JBoss AS 6 officially only supports the Java EE web profile (which doesn't include EJB 2.1 at all), but in practice they have implemented the full stack and EJB 2.1 beans should just work.
That said, if at any way possible, try to avoid EJB 2.1. It's a bloated, nasty and heavy-weight technology that's literally from another era. For any new development EJB 3.1 or even 3.0 is highly recommended.

Related

Does Wildfly 18 Supports Seam 2.3 Applications?

I want to migrate an application from Wildfly 8 to the latest Wildfly 18. The web application uses the following frameworks: hibernate 3, seam 2.2, JSF 1.2, and Richfaces 3.3.3. Since hibernate 3 isn't supported anymore in Wildfly, we need to migrate to hibernate 4 which isn't compatible with Seam 2.2. Thus, we have to migrate to Seam 2.3 and this leads to migrating to JSF 2.3 (Wildfly modules) and to Richfaces 4.
My project is an ear that contains inside it a war folder.
For JSF, I am using the supported module by Wildfly both com.sun.faces.impl and javax.faces.api. I also added jsf-facelets-1.1.15.jar as a jar under web-inf/lib.
For hibernate, I included the following jars in my ear: hibernate-commons-annotations-4.0.5.Final.jar, hibernate-core-4.3.11.Final.jar, and hibernate-entitymanager-4.3.11.Final.jar.
For seam, I included the seam jars: jboss-seam.jar, jboss-seam-debug.jar, ...
For Richfaces, I included the following libraries under the war folder: richfaces-a4j-4.5.17.Final.jar, richfaces-core-4.5.17.Final.jar, and richfaces-rich-4.5.17.Final.jar. I also included their dependencies.
I am still getting this error which I am not able to debug: Unsupported Operation Exception.
Did anyone encountered this issue ? And do you know if Seam 2.3 is still supported by the latest Wildfly especially that on Seam documentation, they gave the project examples on Jboss As 7?
Thank you for your help.
The migration you are trying to achieve will result in a non-supported environment as well.
From http://seamframework.org/
Seam Moving Forward
As many of you may be aware, there have been a number of changes
within Seam over the past year. Here is a quick highlight of the
changes and how they may affect you and your application.
Seam 2
Seam 2.2 targets JBoss AS 5 and 6 as well as JBoss Enterprise
Application Platform 5 - Java EE 5 based architecture Seam 2.3 targets
Java EE 6 capabilities such as JSF2 and JPA2 on the JBoss Enterprise
Application Platform 6 - Seam 2.3 also supports RichFaces 4 which is
also available for commercial support via Web Framework Kit. If you
are looking for the long-term support with a service level agreement
of Seam 2.2 and/or Seam 2.3 then please contact us at
http://www.redhat.com/contact/sales.html Seam 2.3 is part of Web
Framework Kit, included as part of the JBoss Enterprise Application
Platform subscription .
Seam 2.3 was released in September 2012. This is an update to the Seam
2 code base to make it compatible with Jave EE 6. It runs well on
JBoss AS 7.
Seam 3
Active development of Seam 3 has been halted by Red Hat. Many projects
have moved over to Apache DeltaSpike , and others have been absorbed
into different projects. Please see the below table for information
about where the functionality from each module has gone and how you
can participate.
So no, it does not support WildFly 18 (Java EE 8)
Richfaces is 'dead' (sunset) for 4 years now. https://developer.jboss.org/wiki/RichFacesEnd-Of-LifeQuestionsAnswers
JSF 2.x has facelets built-in, so no need to include them. (Causes problems even)
Wildfly 18 has JPA2 built-in so no need to include hibernate manually (Might cause problems even)
Also read https://docs.jboss.org/seam/2.3.0.Final/reference/en-US/html/migration23.html
Switching to using
PrimeFaces (fully html 5, css3 etc compliant)
JPA2
CDI (with Deltaspike)
OmniFaces
OptimusFaces
is a way better thing to do (Although JSF is 'old' compared to e.t.c. Angular it is still modern when combined with the above technologies and more stable).

Packaging JSF web app with Quarkus with JVM mode

Quarkus JVM mode with JSF
I have an existing thorntail 2.4 based web application built using JSF and JEE (CDI/EJB).
For my technology stack above, if I am only using the JVM mode and not the native mode, is it possible to package my application using runtime?
I understand that EJB spec is not implemented with quarkus and I am OK with rewriting EJBs as CDI+JTA services but want to know if it's possible to use JSF with quarkus.
There is an extension for it available: https://github.com/tandraschko/quarkus-myfaces
UPDATE: I moved my 'personal' extension to MyFaces Core and we already have an 2.3-next-M1 release ready.
The showcase is available here and already uses the released version: https://github.com/apache/myfaces/tree/master/extensions/quarkus/showcase
UPDATE: We even released M2 today which supports native images!
Quarkus doesn't provide a JSF extension.
But it should be possible for your application to directly include a JSF implementation as a dependency and have it work

OmniFaces 2.0 "Required CDI" error even though CDI is used

I'm using OmniFaces 1.6 currently, with an application running JSF 2.2.6, Weld 1.1.9, on a Tomcat 7.
I've tried updating OmniFaces to 2.0, but when I do, I get this error message while launching the application (and the application doesn't start):
This OmniFace version requires CDI, but none was found on this environment. OmniFaces 2.x requires a minimum of JSF 2.2
It links to this page: http://omnifaces.org/cdi/
The problem is that, as I said, the application definitely uses JSF 2.2 and CDI.
Any ideas on what could be wrong?
I had same issue with you.
Please check this
http://omnifaces.org/cdi/
here are the additional instructions:
Install CDI 1.1+ in this environment.
For Tomcat users who don't have freedom in server choice, refer this
article: How to install CDI in Tomcat? When installing Weld, make
sure that you're using a minimum of version 2.2.0! Older versions have
initialization ordering bugs.
Switch to a CDI 1.1 capable environment.
For Tomcat users who have full freedom in server choice, just replace
Tomcat by TomEE, or perhaps even by WildFly.

JSF - Trinidad versus MyFaces

I understand that the Trinidad framework is an extension of MyFaces project (who is the JSF implementation). But, I have JSF project that has only the trinidad dependencies. So, I ask:
How works this project without the JSF implementation´s dependencies?
Thank you
Apparently the project which you've in hands is been targeted for deployment on a real Java EE application server.
Normally, JSF is already provided as part of the Java EE API by a decent Java EE application server such as Glassfish, JBoss AS, WebSphere, WebLogic, etc. The web application project does not need to include the JSF libraries at all (like as it does not ever need to include the JSP/Servlet/EJB/JPA/etc libraries when deployed to such a server).
However, in case of barebones JSP/Servlet containers like Tomcat and Jetty, JSF is not provided by the server itself. JSF has either to be manually installed in those containers or to be provided by the web application project itself.
JSF component libraries like Trinidad, PrimeFaces, RichFaces, etc are not part of the Java EE API and thus surely need to be supplied by the web application project itself.

Oracle ADF Faces application on Websphere 7.0

Can someone please help me out with the Oracle ADF faces application which I'm trying to deploy on Websphere 7.0? Do I need to apply any fixpacks on WAS? I'm trying to migrate this project from Websphere 6.1 to Websphere 7.0.
In Websphere 6.1, after removing jsf implementation jar files and providing them as part of WEB-INF\lib and changing the classloader to PARENT_LAST, the application was working fine.
For websphere 7.0, I can't seem to get the application working. It always picks up the Sun's JSF implementation. I've also tried the shared library concept but to no success.
Regards,
Zahir
The Oracle documentation lists a certification for WAS 7.0.0.13 ND. So you need FixPack 13 or later.
As the WebSphere Application Server 7 is a full blown JEE5 server it requires/has JSF 1.2 support. You can switch between the built in Sun and MyFaces implementation if required.
You should probably make sure that the ADF version you are using is certified for WAS 7. The ADF release notes tell that ADF supports JSF 2.0. The WAS 7 only comes with JSF 1.2. Exchanging the JSF version with placing the JSF 2 libs into WEB-INF/lib works well for our projects in conjunction with the 'PARENT_LAST' classloading policy. Make sure that you set the policy either for the whole application or for both the application and the web module.
ADF Faces is a Java based framework and it will run on WebSphere but, you have to add the required libraries first. The easiest way to prepare WebSphere to run ADF Faces application is through JDeveloper. Alternatively, you can google Oracle JRF (Java Runtime Framework) and install that on your WebSphere, before running the ADF Faces application.

Resources