There are two forms of the tomee
webapp to consider:
tomee
webapp will contain all the necessary libraries to add the missing Java EE functionality to Tomcat as well as a small console.tomee
webapp shipped inside a TomEE zip or tar is the same webapp as above, but with the libraries moved into the <tomcat-home>/lib/
directoryThe only real difference between a "Tomcat with drop-in tomee.war" and a "TomEE" install is where the additional libraries live.
Deleting the tomee
webapp from a plain Tomcat install will effectively uninstall TomEE from Tomcat.
Deleting the tomee
webapp from a TomEE install is safe as the needed libraries have been moved into <tomcat-home>/lib/
The only loss of functionality would be the ability to remotely execute EJBs over HTTP. However this can easily be added to a different webapp like so:
<servlet>
<servlet-name>ServerServlet</servlet-name>
<servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServerServlet</servlet-name>
<url-pattern>/myejbs/*</url-pattern>
</servlet-mapping>
Then you can create an InitialContext
that points to that webapp like so:
Properties p = new Properties();
p.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
p.put("java.naming.provider.url", "http://127.0.0.1:8080/mywebapp/myejbs");
// user and pass optional
p.put("java.naming.security.principal", "myuser");
p.put("java.naming.security.credentials", "mypass");
InitialContext ctx = new InitialContext(p);
MyBean myBean = (MyBean) ctx.lookup("MyBeanRemote");