openwebbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerhard Petracek <gerhard.petra...@gmail.com>
Subject Re: OWB on Tomcat 7
Date Mon, 18 Nov 2013 15:33:56 GMT
as mentioned at [1] we have to think about a better approach.

regards,
gerhard

[1] https://issues.apache.org/jira/browse/OWB-915



2013/11/12 Niki Dokovski <nickytd@gmail.com>

>
>
>
> On Tue, Nov 12, 2013 at 2:37 PM, Romain Manni-Bucau <rmannibucau@gmail.com
> > wrote:
>
>> Hi
>>
>> 1) if you have time it would be great ;)
>>
>
> OK I'll give it a try with tomcat7-sample, including a proposal for the
> SecurityListener case
>
> 2) +1
>> 3) yes, it never really worked in fact with servlet >= 3.0 containers. in
>> TomEE we are integrated far deeper to get a consistent behavior on that
>> point (we automatically wrap the tomcat realm with
>> http://svn.apache.org/repos/asf/tomee/tomee/trunk/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/TomEERealm.java
>> )
>>
>> *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
>> <http://fr.linkedin.com/in/rmannibucau>*
>> *Github: https://github.com/rmannibucau <https://github.com/rmannibucau>*
>>
>>
>>
>> 2013/11/12 Niki Dokovski <nickytd@gmail.com>
>>
>>> ops sorry hit send too early. here is the rest
>>>
>>>
>>> On Tue, Nov 12, 2013 at 2:20 PM, Niki Dokovski <nickytd@gmail.com>wrote:
>>>
>>>>
>>>>
>>>> Hi folks,
>>>>
>>>>  On Tue, Nov 12, 2013 at 1:48 PM, Mark Struberg <struberg@yahoo.de>wrote:
>>>>
>>>>> hi ludovic!
>>>>>
>>>>> Nope, you don't need it in there. What we do in a few apps is to
>>>>> package those apps into an EAR, then unpack the whole EAR into the
>>>>> ./webapps folder in tomcat and add the /lib folder as shared.loader in
>>>>> ./conf/catalina.properties.
>>>>> That gives you a shared ClassLoader which sits inbetween tomcat and
>>>>> your single webapps. Those WARs will be child-classloaders of the shared
>>>>> loader.
>>>>>
>>>>> Of course you can also move all the stuff into tomcats lib folder as
>>>>> well...
>>>>>
>>>>
>>>> I did the exercise of running out of the box the tomcat7-sample
>>>> application  located at ${owb-trunk}/samples/tomcat7-sample project.
>>>> My goal is to do simple mvn clean package tomcat7:run and have the
>>>> sample hosted on the embedded tomcat.
>>>>  Here are my findings and would like to ask for clarifications:
>>>> 1. the project uses old tomcat-maven-plugin version 1.1 therefore i
>>>> switched to 2.2. That gets as dependency tomcat 7.0.47. Which from its side
>>>> has modified TomcatInstance interface. The latter should be implemented by
>>>> openwebbeans-tomcat7. QuickFix does the trick.
>>>>
>>>     2. To get the filter injected as in the sample, we need to supply
>>> the tomcat ContextLifecycleListener.  The latter has to be put in a jar
>>> located under tomcat/lib folder. No other locations for this jar are valid.
>>> Of course that simply means that all the dependencies should be located
>>> under tomcat/lib as well.
>>>   3. After setting the dependencies and having proper configuration for
>>> both the tomcat (context listener) and the application
>>> (webcontextlistener)The container throws NPE after a successful
>>> authentication. The NPE is a result of an assumption in owb that the
>>> TomcatSercurityListener is invoked when all properties of the request are
>>> initialized including the user principle. Actually the user principle is
>>> set later by the basic authenticator valve. This is proper container
>>> behavior, the RI behaves in the exact same way in relation to the
>>> initialization of a servlet request listeners.
>>>
>>> Basically my questions are:
>>> 1. Do you think we could invest in bringing all of the samples running
>>> out of the box, serving their main purpose?
>>> 2. What about updating the dependencies towards specific components to
>>> much recent versions
>>> 3. Is there a bug in openwebbean-tomcat7 TomcatSecurityListener?
>>>
>>>
>>> cheers
>>> Niki
>>>
>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> LieGrue,
>>>>> strub
>>>>>
>>>>>
>>>>>   ------------------------------
>>>>>  *From:* "l.penet@senat.fr" <l.penet@senat.fr>
>>>>> *To:* user@openwebbeans.apache.org
>>>>> *Sent:* Tuesday, 12 November 2013, 9:19
>>>>>
>>>>> *Subject:* Re: OWB on Tomcat 7
>>>>>
>>>>> On 09/11/2013 14:24, Mark Struberg wrote:
>>>>>
>>>>> Hi folks!
>>>>>
>>>>> There are 2 different ways to work with OpenWebBeans and tomcat.
>>>>>
>>>>> A, your app is using CDI but you do not need the container to
>>>>> understand CDI.
>>>>> In that case just add owb-core jar + spi + xbean-asm4-shaded + owb-web
>>>>> into your WEB-INF/lib and add WebBeansConfigurationListener to your web.xml
>>>>> as <listener>
>>>>>
>>>>>  Is it required that openwebbeans is in tomcat WEB-INF/lib ? In my
>>>>> environment, we can have tens of webapps on a single tomcat server.
>>>>> In this contexte, requiring all of them to use the same version of OWB
>>>>> is not a sensible option.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Ludovic
>>>>>
>>>>> |
>>>>> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
>>>>> |
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Mime
View raw message