How to embed OpenEJB in existing Tomcat installation - java

I have a current install of Tomcat 8. I'd like to add EJB support to it. But when I searched online for how to embed OpenEJB into Tomcat, I only found TomEE results and nothing about plain Tomcat. I'd prefer not to have a dedicated EJB server running, but to instead run the EJBs on the same JVM as Tomcat and my application. How should I go about doing this?

The absolute best way to do that is just to download Apache TomEE, which nothing more than Tomcat with OpenEJB already embedded in it! :)

You can add tomee webapp into your tomcat (through server.xml is fine), ensure you have tomee-loader in common.loader through catalina.properties and add in server.xml org.apache.tomee.loader.OpenEJBListener in the server.xml Listeners.

Related

Migrating EAR-Files from Apache Geronimo to tomEE

I'm trying to migrate some EAR-files from Apache Geronimo 3.0.1 to Apache tomEE 7.0.2.
The only reason to migrate is the "death" of Geronimo and it's lack of Java 8 Support and tomEE looks like its successor.
I was able to get the server running in eclipse 4.6.3 and deploy a new dynamic web project but I can't create a EAR-project for tomEE.
Do I have to change the EARs (containing multiple .war-files) into single .war-files? It seems like tomEE has EAR-support (http://tomee.apache.org/deploying-in-tomee.html) but I can't find any info how to create one that will work.
Thanks for your support!
you can define where is your ear using in tomee.xml and then just drop your .ear in tomee.base/apps.

Tomcat 8 how to set jarsToSkip

We are using Tomcat 7.0 and we want to switch to tomcat 8. There was a parameter in Tomcat 7.0 org.apache.catalina.startup.ContextConfig.jarsToSkip but it does not work in tomcat 8.0.
Any idea ?!
Long Story
Our web application provides some web-services. We used the webservices-rt-2.3.1.jar to implement web services. The jar has a servlet named WSServletContainerInitializer which extends ServletContainerInitializer this auto starts by Tomcat. This was not what we wanted, so we used the org.apache.catalina.startup.ContextConfig.jarsToSkip=webservices-rt-2.3.1.jar to force Tomcat to skip this jar.
You may be looking for the JarScanFilter which is new in Tomcat 8. It's much more flexible than the all-encompassing jarsToSkip setting in Tomcat 7.

Disable web app auto-reloading in standalone Jetty server

How can I disable .war auto-reloading in Jetty server?
This question addresses the problem, but its for Jetty Maven, while I am using standalone version.
Look for the scanInterval in the WebAppProvider configuration and set it to 0 to disable hot deployment.
http://www.eclipse.org/jetty/documentation/current/hot-deployment.html

Where to put property file in JBOSS 7 or Glassflish? (Best practice)

I have developed applications for JBOSS EAP 5 with eclipse. I placed property files under server-conf/conf/...
I am now developing in Netbeans (7.2). The bundled glassfish server is used for easier development. The target environment is JBOSS EAP 6. What is the best place to place property files? A common place for both environments would be great.
If you want to have them external to the application you'll probably have to write a custom module. This isn't as bad as it sounds, check out HowToPutAnExternalFileInTheClasspath.
See also migration-issues-to-jboss-7-1
The most practical solution is creating a custom folder outside both JBOSS and Glassfish (i.e C:\PropertiesFolder) then add this folder to the classpath of each server.
Please read my postfor more details about classpath in JBoss

Error while adding WebSphere in Eclipse

I am trying to use WebSphere v6.0 with Eclipse. When I try to add the runtime server for a Dynamic Web Project, I get the following error:
Missing classpath entry \your_server_root\was-6.0\properties
Why?
My thought? Add that entry to the CLASSPATH.
Another thought would be to ditch WebSphere and use Tomcat, JBOSS, or Glassfish.

Categories