tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bernard <bht...@gmail.com>
Subject Re: TomEE per Wep App only
Date Wed, 07 Aug 2013 10:40:17 GMT
Hi!

Thanks for your help. I experimented with your suggestion, but I
wasn't lucky. I tried to follow the spirit of your advice of a maven
war overlay - by hand. I added the war file content as libs to my ant
project. Then I added the servlet entry to the web.xml of the app and
got:

java.lang.NullPointerException
	at
org.apache.tomee.loader.TomcatEmbedder.embed(TomcatEmbedder.java:88)
	at
org.apache.tomee.loader.LoaderServlet.init(LoaderServlet.java:66)

Did I miss anything?

TomEE appears to insist on loading classes from "tomee.war". If I copy
tomee.war to tomcat then tomcat extracts it and produces other errors.

For me, this use case has been a wakeup call. I should have been
prepared for it. My current assignment is in an organization that has
not yet decided between Spring and standard EJB technology. I prefer
EJB. Still I am losing the battle because I cannot DEPLOY EJB to a
plain Tomcat installation.

The irony is that deployment of the full EJB stack into a raw Tomcat
is against TomEE's natural objective i.e. integration and small and
fast application deployments. But it could make the switch away from
Spring easier. Developers could deploy on TomEE while production may
run on plain Tomcat.

In other words, it would be nice to have a supported solution for this
use case.

Regards,

Bernard


On Tue, 6 Aug 2013 09:25:52 +0200, you wrote:

>Hi,
>
>an easy way to test it is to include tomee in your war (i think the easiest
>is to do an overlay of tomee war) and declare in your web.xml:
>
>  <servlet>
>    <servlet-name>LoaderServlet</servlet-name>
>    <servlet-class>org.apache.tomee.loader.LoaderServlet</servlet-class>
>  </servlet>
>
>btw this was an old solution, i didn't check it recently
>
>the drop in war approach alone you'll hit startup order issues, if you can
>add the OpenEJBListener in server.xml it is pretty much the same as a
>default tomee.
>
>
>*Romain Manni-Bucau*
>*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
>*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
>*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
>*Github: https://github.com/rmannibucau*
>
>
>
>2013/8/6 Bernard <bht237@gmail.com>
>
>> Hi,
>>
>> Can TomEE provide JavaEE functionality without the modification of the
>> server as described at
>>
>> http://tomee.apache.org/installation-drop-in-war.html ?
>>
>> The old OpenEJB document at
>>
>> http://openejb.codehaus.org/tomcat.html
>>
>> describes this as follows:
>>
>> "OpenEJB per webapp - deployed EJBs are visible only to the web apps
>> that declared to load OpenEJB"
>>
>> I would be useful for me because my production environment has high
>> resistance to any changes of the server environment which cannot be
>> justified for my EJB3 web application alone.
>>
>> My EJBs don't need to be visible to other applications.
>>
>> Otherwise, if this is not possible, where can I learn about the impact
>> and risks of the standard drop-in .war approach?
>>
>> Many thanks
>>
>> Bernard
>>


Mime
View raw message