You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Thomas Driessen <th...@ds-lab.org> on 2015/05/08 15:29:03 UTC

ServletContextListener

Hi!

I'm currently trying to integrate Apache Shiro into my OSGi
(Web-)Application which is built upon Apache Felix.
According to the Shiro Setup Tutorial for normal Web Applications I have to
add the following lines in my web.xml:

<listener>
    <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class></listener>
<filter>
    <filter-name>ShiroFilter</filter-name>
    <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class></filter>

and some entries for the filter-mapping.

As I'm working with felix.http and felix.whiteboard I thought, I could
achieve the same result by registering the EnvironmentLoaderListener under
the ServletContextListener Interface and the ShiroFilter under the Filter
Interface via an Activator, like this:

public class DMActivator extends DependencyActivatorBase {

@Override
public void destroy(BundleContext arg0, DependencyManager dm) throws
Exception {}

@Override
public void init(BundleContext arg0, DependencyManager dm) throws Exception
{
dm.add(createComponent()
.setImplementation(EnvironmentLoaderListener.class)
.setInterface(ServletContextListener.class.getName(), null));
dm.add(createComponent()
.setImplementation(ShiroFilter.class)
.setInterface(Filter.class.getName(), null));
}
}

Unfortunately, the documentation of felix states, that
ServletContextListener are not supported (but should be in the near future)
by felix. Is there any other way I can add shiro to my webapp, that I'm not
aware of? Is the documentation up-to-date or is the ServletContextListener
maybe already added?

Any advice is appreciated :)

Thanks in advance for your help.

Best regards,
Thomas


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Pierre De Rop <pi...@gmail.com>.
... oops, the 3 dm bundles was missing in my previous mail:

    0|Active     |    0|System Bundle (5.0.0)
    1|Active     |    1|Apache Felix Bundle Repository (2.0.4)
    2|Active     |    1|Apache Felix Configuration Admin Service (1.8.4)
    3|Active     |    1|Apache Felix Dependency Manager (4.0.1)
    4|Active     |    1|Apache Felix Dependency Manager Runtime (4.0.1)
    5|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)
    6|Active     |    1|Apache Felix EventAdmin (1.4.2)
    7|Active     |    1|Apache Felix Gogo Command (0.14.0)
    8|Active     |    1|Apache Felix Gogo Runtime (0.16.2)
    9|Active     |    1|Apache Felix Gogo Shell (0.10.0)
   10|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
   11|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
   12|Active     |    1|Apache Felix Servlet API (1.1.1.SNAPSHOT)
   13|Active     |    1|Apache Felix Log Service (1.0.1)
   14|Active     |    1|Apache Felix Metatype Service (1.0.12)


/Pierre

On Tue, May 12, 2015 at 5:30 PM, Pierre De Rop <pi...@gmail.com>
wrote:

> Thomas,
>
> I suggest to not include the api bundles in the runtime (osgi.enterprise,
> and osgi.residential), which should only be used at build time, not at
> runtime.
>
> so, can you please remove them and also add event admin, metatype, and log
> service, like this:
>
>     1|Active     |    1|Apache Felix Bundle Repository (2.0.4)
>     2|Active     |    1|Apache Felix Configuration Admin Service (1.8.4)
>     3|Active     |    1|Apache Felix Gogo Command (0.14.0)
>     4|Active     |    1|Apache Felix Gogo Runtime (0.16.2)
>     5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>     6|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
>     7|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
>     8|Active     |    1|Apache Felix Servlet API (1.1.1.SNAPSHOT)
>     9|Active     |    1|Apache Felix Metatype Service (1.0.12)
>    10|Active     |    1|Apache Felix EventAdmin (1.4.2)
>    11|Active     |    1|Apache Felix Log Service (1.0.1)
>
> (by the way, the  integration tests are failing when building jetty, and I
> had to use -Dmaven.test.skip=true in order to build Http Jetty).
>
>
> cheers;
> /Pierre
>
>
> On Tue, May 12, 2015 at 4:56 PM, Thomas Driessen <
> thomas.driessen@ds-lab.org> wrote:
>
>> Hey,
>>
>> First: Thanks for all your advices.
>>
>> I tried the Property as Pierre mentioned, but still my setup is not
>> recognizing my SCL.
>> I'll copy my console printout so maybe you can spot something wrong with
>> my
>> setup:
>>
>>
>> 2015-05-12 16:32:38.153:INFO::main: Logging initialized @998ms
>> 2015-05-12 16:32:38.193:INFO:oejs.Server:main: jetty-9.2.9.v20150224
>> ____________________________
>> Welcome to Apache Felix Gogo
>>
>> g! 2015-05-12 16:32:38.254:INFO:oejsh.ContextHandler:main: Started
>> o.e.j.s.ServletContextHandler@7c417213{/,null,AVAILABLE}
>> 2015-05-12 16:32:38.254:INFO:oejs.Server:main: Started @1092ms
>> 2015-05-12 16:32:38.325:INFO:oejs.ServerConnector:main: Started
>> ServerConnector@7b355613{HTTP/1.1}{0.0.0.0:8080}
>> [INFO] Started Jetty 9.2.9.v20150224 at port(s) HTTP:8080 on context path
>> /
>> Hello
>> lb
>> START LEVEL 1
>>    ID|State      |Level|Name
>>     0|Active     |    0|System Bundle (5.1.0.SNAPSHOT)
>>     1|Active     |    1|Apache Felix Configuration Admin Service (1.8.0)
>>     2|Active     |    1|Apache Felix Dependency Manager (4.0.1)
>>     3|Active     |    1|Apache Felix Dependency Manager Runtime (4.0.1)
>>     4|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)
>>     5|Active     |    1|Apache Felix Gogo Command (0.14.0)
>>     6|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
>>     7|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>>     8|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
>>     9|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
>>    10|Active     |    1|Apache Felix Servlet API (1.1.0)
>>    11|Active     |    1|osgi.enterprise (4.2.0.201003190513)
>>    12|Active     |    1|osgi.residential (4.3.0.201111022239)
>>    13|Active     |    1|testit.test (0.0.0.201505121432)
>> g! dm
>> [3] org.apache.felix.dependencymanager.runtime
>>  [0] org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>>     active (DependencyManager-Component=*) bundle optional available
>>     org.osgi.service.packageadmin.PackageAdmin service required available
>>     org.osgi.service.log.LogService service optional unavailable
>> [13] testit.test
>>  [1]
>> javax.servlet.ServletContextListener(osgi.http.whiteboard.listener=true)
>> registered
>>
>> Bundle [13] is merely my SCL:
>>
>> @Component(properties =
>> @Property(name="osgi.http.whiteboard.listener",value="true"))
>> public class MyContextListener implements ServletContextListener {
>>
>> @Override
>> public void contextDestroyed(ServletContextEvent arg0) {
>> // TODO Auto-generated method stub
>> System.out.println("MyContextListener.contextDestroyed()");
>> }
>>
>> @Override
>> public void contextInitialized(ServletContextEvent arg0) {
>> // TODO Auto-generated method stub
>> System.out.println("MyContextListener.contextInitialized()");
>> }
>>  @Start
>> public void start(){
>> System.out.println("Hello");
>> }
>> }
>>
>>
>> I tried the same Setup with http.whiteboard and http.basic explicitly
>> added
>> to my runrequirements, but neihter of those worked.
>>
>>
>> Two small notes:
>> 1) the mentioned property "osgi.http.whiteboard.listener" is never
>> mentioned in RFC-189 -> should it be mentioned?
>> 2) Two dependency chains of http.jetty.3.0.3.SNAPSHOT leads to two jetty
>> bundles being automatically resolved by bndtools.
>>
>> The 1st chain is: jetty.3.0.3 -> org.osgi.metatype.1.1.0 ->
>> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
>> The 2nd chain is: jetty.3.0.3 -> org.osgi.useradmin.1.1.0 ->
>> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
>>
>> Is this an intended behaviour?
>>
>> Best regards ant thanks for your patience,
>> Thomas
>>
>> 2015-05-12 15:43 GMT+02:00 Pierre De Rop <pi...@gmail.com>:
>>
>> > Hello Thomas,
>> >
>> > if you are using DM annotations, you can try to add the service property
>> > mentioned by Raymond using the following:
>> >
>> > @Component(properties = @Property(name =
>> "osgi.http.whiteboard.listener",
>> > value = "true"))
>> > public class MyContextListener implements ServletContextListener {
>> > ...
>> > }
>> >
>> > And if your component also depends on other services, you might also
>> need
>> > to check proper activation of your component using the "dm" shell
>> > command,like "dm b <bundle id>".
>> >
>> > hope this helps;
>> > /Pierre
>> >
>> > On Tue, May 12, 2015 at 3:09 PM, Raymond Auge <raymond.auge@liferay.com
>> >
>> > wrote:
>> >
>> > > You are missing the required service property
>> > > "osgi.http.whiteboard.listener=true" on your SCL.
>> > >
>> > > Sincerely,
>> > > - Ray
>> > >
>> > > On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <
>> > > thomas.driessen@ds-lab.org
>> > > > wrote:
>> > >
>> > > > Hi Carsten,
>> > > >
>> > > > forget my last question, I still used felix 4.4.1 as my OSGI
>> > Framework. I
>> > > > switched this to 5.1.0.SNAPSHOT and everything got resolved as
>> > expected.
>> > > >
>> > > > But still my ServletContextListener seems not to be invoked, as i
>> get
>> > no
>> > > > outputs on contextInitialized.
>> > > >
>> > > > This is my ServletContextListener:
>> > > >
>> > > > @Component(provides=ServletContextListener.class)
>> > > > public class MyContextListener implements ServletContextListener {
>> > > >
>> > > > @Override
>> > > > public void contextDestroyed(ServletContextEvent arg0) {
>> > > > // TODO Auto-generated method stub
>> > > > System.out.println("MyContextListener.contextDestroyed()");
>> > > > }
>> > > >
>> > > > @Override
>> > > > public void contextInitialized(ServletContextEvent arg0) {
>> > > > // TODO Auto-generated method stub
>> > > > System.out.println("MyContextListener.contextInitialized()");
>> > > > }
>> > > > }
>> > > >
>> > > > Might it be that the DM-Annotations are not working? Or do I have to
>> > add
>> > > > some attributes?
>> > > > Sorry for all those questions but right now I'm pretty confused :(
>> > > >
>> > > > Thanks for all your advice :)
>> > > >
>> > > > Thomas
>> > > >
>> > > > 2015-05-12 12:08 GMT+02:00 Thomas Driessen <
>> thomas.driessen@ds-lab.org
>> > >:
>> > > >
>> > > > > Hi Carsten,
>> > > > >
>> > > > > I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT)
>> to
>> > my
>> > > > > runrequirements but now it says it is missing the package
>> > org.osgi.dto
>> > > ?
>> > > > > I tried to add org.osgi.core (6.0.0) but that didn't help.
>> > > > >
>> > > > > Do I have to add some other bundles on which http.jetty and
>> http.api
>> > > are
>> > > > > relying?
>> > > > >
>> > > > > Thomas
>> > > > >
>> > > > > 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cziegeler@apache.org
>> >:
>> > > > >
>> > > > >> Am 11.05.15 um 18:51 schrieb Scott Lewis:
>> > > > >> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
>> > > > >> >> <stuff deleted>
>> > > > >> >> Is there a release scheduled that will include all the http
>> > service
>> > > > >> >> changes for R6 final?
>> > > > >> >>
>> > > > >> >> Yes, once there is an official final R6 version, we can do a
>> > > release.
>> > > > >> >
>> > > > >> > Any schedule around such a release?   I know that the R6 spec
>> is
>> > not
>> > > > >> > done/approved/frozen, etc., but I'm just asking what plans
>> exist.
>> > > > >> >
>> > > > >> I assume somewhere in Q3
>> > > > >>
>> > > > >> Carsten
>> > > > >>
>> > > > >>
>> > > > >> --
>> > > > >> Carsten Ziegeler
>> > > > >> Adobe Research Switzerland
>> > > > >> cziegeler@apache.org
>> > > > >>
>> > > > >>
>> > ---------------------------------------------------------------------
>> > > > >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> > > > >> For additional commands, e-mail: users-help@felix.apache.org
>> > > > >>
>> > > > >>
>> > > > >
>> > > > >
>> > > > > --
>> > > > > M.Sc. Thomas Driessen
>> > > > > Software Methodologies for Distributed Systems
>> > > > > Institute of Computer Science
>> > > > > University of Augsburg
>> > > > > Universitätsstr. 6a
>> > > > > 86135 Augsburg, Germany
>> > > > >
>> > > > > Tel:    +49 821 598-2486
>> > > > > email: thomas.driessen@informatik.uni-augsburg.de
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > M.Sc. Thomas Driessen
>> > > > Software Methodologies for Distributed Systems
>> > > > Institute of Computer Science
>> > > > University of Augsburg
>> > > > Universitätsstr. 6a
>> > > > 86135 Augsburg, Germany
>> > > >
>> > > > Tel:    +49 821 598-2486
>> > > > email: thomas.driessen@informatik.uni-augsburg.de
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>> > >  (@rotty3000)
>> > > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>> > >  (@Liferay)
>> > > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>> > > (@OSGiAlliance)
>> > >
>> >
>>
>>
>>
>> --
>> M.Sc. Thomas Driessen
>> Software Methodologies for Distributed Systems
>> Institute of Computer Science
>> University of Augsburg
>> Universitätsstr. 6a
>> 86135 Augsburg, Germany
>>
>> Tel:    +49 821 598-2486
>> email: thomas.driessen@informatik.uni-augsburg.de
>>
>
>

Re: ServletContextListener

Posted by Pierre De Rop <pi...@gmail.com>.
Thomas,

I suggest to not include the api bundles in the runtime (osgi.enterprise,
and osgi.residential), which should only be used at build time, not at
runtime.

so, can you please remove them and also add event admin, metatype, and log
service, like this:

    1|Active     |    1|Apache Felix Bundle Repository (2.0.4)
    2|Active     |    1|Apache Felix Configuration Admin Service (1.8.4)
    3|Active     |    1|Apache Felix Gogo Command (0.14.0)
    4|Active     |    1|Apache Felix Gogo Runtime (0.16.2)
    5|Active     |    1|Apache Felix Gogo Shell (0.10.0)
    6|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
    7|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
    8|Active     |    1|Apache Felix Servlet API (1.1.1.SNAPSHOT)
    9|Active     |    1|Apache Felix Metatype Service (1.0.12)
   10|Active     |    1|Apache Felix EventAdmin (1.4.2)
   11|Active     |    1|Apache Felix Log Service (1.0.1)

(by the way, the  integration tests are failing when building jetty, and I
had to use -Dmaven.test.skip=true in order to build Http Jetty).


cheers;
/Pierre


On Tue, May 12, 2015 at 4:56 PM, Thomas Driessen <thomas.driessen@ds-lab.org
> wrote:

> Hey,
>
> First: Thanks for all your advices.
>
> I tried the Property as Pierre mentioned, but still my setup is not
> recognizing my SCL.
> I'll copy my console printout so maybe you can spot something wrong with my
> setup:
>
>
> 2015-05-12 16:32:38.153:INFO::main: Logging initialized @998ms
> 2015-05-12 16:32:38.193:INFO:oejs.Server:main: jetty-9.2.9.v20150224
> ____________________________
> Welcome to Apache Felix Gogo
>
> g! 2015-05-12 16:32:38.254:INFO:oejsh.ContextHandler:main: Started
> o.e.j.s.ServletContextHandler@7c417213{/,null,AVAILABLE}
> 2015-05-12 16:32:38.254:INFO:oejs.Server:main: Started @1092ms
> 2015-05-12 16:32:38.325:INFO:oejs.ServerConnector:main: Started
> ServerConnector@7b355613{HTTP/1.1}{0.0.0.0:8080}
> [INFO] Started Jetty 9.2.9.v20150224 at port(s) HTTP:8080 on context path /
> Hello
> lb
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (5.1.0.SNAPSHOT)
>     1|Active     |    1|Apache Felix Configuration Admin Service (1.8.0)
>     2|Active     |    1|Apache Felix Dependency Manager (4.0.1)
>     3|Active     |    1|Apache Felix Dependency Manager Runtime (4.0.1)
>     4|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)
>     5|Active     |    1|Apache Felix Gogo Command (0.14.0)
>     6|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
>     7|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>     8|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
>     9|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
>    10|Active     |    1|Apache Felix Servlet API (1.1.0)
>    11|Active     |    1|osgi.enterprise (4.2.0.201003190513)
>    12|Active     |    1|osgi.residential (4.3.0.201111022239)
>    13|Active     |    1|testit.test (0.0.0.201505121432)
> g! dm
> [3] org.apache.felix.dependencymanager.runtime
>  [0] org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>     active (DependencyManager-Component=*) bundle optional available
>     org.osgi.service.packageadmin.PackageAdmin service required available
>     org.osgi.service.log.LogService service optional unavailable
> [13] testit.test
>  [1]
> javax.servlet.ServletContextListener(osgi.http.whiteboard.listener=true)
> registered
>
> Bundle [13] is merely my SCL:
>
> @Component(properties =
> @Property(name="osgi.http.whiteboard.listener",value="true"))
> public class MyContextListener implements ServletContextListener {
>
> @Override
> public void contextDestroyed(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextDestroyed()");
> }
>
> @Override
> public void contextInitialized(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextInitialized()");
> }
>  @Start
> public void start(){
> System.out.println("Hello");
> }
> }
>
>
> I tried the same Setup with http.whiteboard and http.basic explicitly added
> to my runrequirements, but neihter of those worked.
>
>
> Two small notes:
> 1) the mentioned property "osgi.http.whiteboard.listener" is never
> mentioned in RFC-189 -> should it be mentioned?
> 2) Two dependency chains of http.jetty.3.0.3.SNAPSHOT leads to two jetty
> bundles being automatically resolved by bndtools.
>
> The 1st chain is: jetty.3.0.3 -> org.osgi.metatype.1.1.0 ->
> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
> The 2nd chain is: jetty.3.0.3 -> org.osgi.useradmin.1.1.0 ->
> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
>
> Is this an intended behaviour?
>
> Best regards ant thanks for your patience,
> Thomas
>
> 2015-05-12 15:43 GMT+02:00 Pierre De Rop <pi...@gmail.com>:
>
> > Hello Thomas,
> >
> > if you are using DM annotations, you can try to add the service property
> > mentioned by Raymond using the following:
> >
> > @Component(properties = @Property(name = "osgi.http.whiteboard.listener",
> > value = "true"))
> > public class MyContextListener implements ServletContextListener {
> > ...
> > }
> >
> > And if your component also depends on other services, you might also need
> > to check proper activation of your component using the "dm" shell
> > command,like "dm b <bundle id>".
> >
> > hope this helps;
> > /Pierre
> >
> > On Tue, May 12, 2015 at 3:09 PM, Raymond Auge <ra...@liferay.com>
> > wrote:
> >
> > > You are missing the required service property
> > > "osgi.http.whiteboard.listener=true" on your SCL.
> > >
> > > Sincerely,
> > > - Ray
> > >
> > > On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <
> > > thomas.driessen@ds-lab.org
> > > > wrote:
> > >
> > > > Hi Carsten,
> > > >
> > > > forget my last question, I still used felix 4.4.1 as my OSGI
> > Framework. I
> > > > switched this to 5.1.0.SNAPSHOT and everything got resolved as
> > expected.
> > > >
> > > > But still my ServletContextListener seems not to be invoked, as i get
> > no
> > > > outputs on contextInitialized.
> > > >
> > > > This is my ServletContextListener:
> > > >
> > > > @Component(provides=ServletContextListener.class)
> > > > public class MyContextListener implements ServletContextListener {
> > > >
> > > > @Override
> > > > public void contextDestroyed(ServletContextEvent arg0) {
> > > > // TODO Auto-generated method stub
> > > > System.out.println("MyContextListener.contextDestroyed()");
> > > > }
> > > >
> > > > @Override
> > > > public void contextInitialized(ServletContextEvent arg0) {
> > > > // TODO Auto-generated method stub
> > > > System.out.println("MyContextListener.contextInitialized()");
> > > > }
> > > > }
> > > >
> > > > Might it be that the DM-Annotations are not working? Or do I have to
> > add
> > > > some attributes?
> > > > Sorry for all those questions but right now I'm pretty confused :(
> > > >
> > > > Thanks for all your advice :)
> > > >
> > > > Thomas
> > > >
> > > > 2015-05-12 12:08 GMT+02:00 Thomas Driessen <
> thomas.driessen@ds-lab.org
> > >:
> > > >
> > > > > Hi Carsten,
> > > > >
> > > > > I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT)
> to
> > my
> > > > > runrequirements but now it says it is missing the package
> > org.osgi.dto
> > > ?
> > > > > I tried to add org.osgi.core (6.0.0) but that didn't help.
> > > > >
> > > > > Do I have to add some other bundles on which http.jetty and
> http.api
> > > are
> > > > > relying?
> > > > >
> > > > > Thomas
> > > > >
> > > > > 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cziegeler@apache.org
> >:
> > > > >
> > > > >> Am 11.05.15 um 18:51 schrieb Scott Lewis:
> > > > >> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> > > > >> >> <stuff deleted>
> > > > >> >> Is there a release scheduled that will include all the http
> > service
> > > > >> >> changes for R6 final?
> > > > >> >>
> > > > >> >> Yes, once there is an official final R6 version, we can do a
> > > release.
> > > > >> >
> > > > >> > Any schedule around such a release?   I know that the R6 spec is
> > not
> > > > >> > done/approved/frozen, etc., but I'm just asking what plans
> exist.
> > > > >> >
> > > > >> I assume somewhere in Q3
> > > > >>
> > > > >> Carsten
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Carsten Ziegeler
> > > > >> Adobe Research Switzerland
> > > > >> cziegeler@apache.org
> > > > >>
> > > > >>
> > ---------------------------------------------------------------------
> > > > >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > > >> For additional commands, e-mail: users-help@felix.apache.org
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > > > --
> > > > > M.Sc. Thomas Driessen
> > > > > Software Methodologies for Distributed Systems
> > > > > Institute of Computer Science
> > > > > University of Augsburg
> > > > > Universitätsstr. 6a
> > > > > 86135 Augsburg, Germany
> > > > >
> > > > > Tel:    +49 821 598-2486
> > > > > email: thomas.driessen@informatik.uni-augsburg.de
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > M.Sc. Thomas Driessen
> > > > Software Methodologies for Distributed Systems
> > > > Institute of Computer Science
> > > > University of Augsburg
> > > > Universitätsstr. 6a
> > > > 86135 Augsburg, Germany
> > > >
> > > > Tel:    +49 821 598-2486
> > > > email: thomas.driessen@informatik.uni-augsburg.de
> > > >
> > >
> > >
> > >
> > > --
> > > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> > >  (@rotty3000)
> > > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> > >  (@Liferay)
> > > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> > > (@OSGiAlliance)
> > >
> >
>
>
>
> --
> M.Sc. Thomas Driessen
> Software Methodologies for Distributed Systems
> Institute of Computer Science
> University of Augsburg
> Universitätsstr. 6a
> 86135 Augsburg, Germany
>
> Tel:    +49 821 598-2486
> email: thomas.driessen@informatik.uni-augsburg.de
>

Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
It's working :D

Thank you very much!!!


2015-05-13 14:36 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Am 13.05.15 um 14:28 schrieb Thomas Driessen:
> > Hey Carsten,
> >
> > I'm glad to hear it's been such an easy fix :)
> > So if I pull the repository from github.com/apache/felix, then which
> > bundles do I have to update?
> > Right now I only see changes in the configadmin.
>
> THe change is in http/base, so you need to build http/base and then
> http/jetty and update that bundle
>
> Revision is 1679184
>
> Carsten
>
> >
> > Best regards,
> > Thomas
> >
> > 2015-05-13 14:12 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> >
> >> Thanks for the test code, it's actually a bug in the implementation. If
> >> the listener is registered after the context (which is always true for
> >> the default context), it was never called.
> >> I just committed a fix for this
> >>
> >> Regards
> >> Carsten
> >>
> >> Am 13.05.15 um 11:53 schrieb Thomas Driessen:
> >>> Hi Ray,
> >>>
> >>> I've now the same setup as you posted it but it still doesn't work :(
> No
> >>> Sysouts are printed on my console for contextInitialized.
> >>>
> >>> I've copied the Testsetup to my Google Drive, so if you want you could
> >> have
> >>> a look on it:
> >>>
> >>>
> >>
> https://drive.google.com/folderview?id=0Bw1daHW2hcyZWFhlcldtdGV6alE&usp=sharing
> >>>
> >>> Best regards,
> >>> Thomas
> >>>
> >>> 2015-05-12 22:33 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> >>>
> >>>> On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <
> >> bcanhome@googlemail.com>
> >>>> wrote:
> >>>>
> >>>>> Hi Ray,
> >>>>>
> >>>>> even though it might be a bit off-topic, but you started it ;)
> >>>>>
> >>>>> I encourage everyone to step up and join the OSGi Alliance to get
> this
> >>>> work
> >>>>>> progressing faster. To a very large degree this is the limiting
> factor
> >>>>> for
> >>>>>> why spec progression is slow).
> >>>>>
> >>>>>
> >>>>> For someone like me who only works on the OSGi related stuff like Pax
> >> Web
> >>>>> (btw. ServletContextListener work without any issues with it, it's
> just
> >>>> not
> >>>>> yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard
> to
> >>>>> join. There are a couple people out there with great ideas, but can't
> >>>> join
> >>>>> cause they don't work a company that is interested in funding such
> >>>>> involvement. Maybe you as a board member and co-chair for the EEG can
> >>>> help
> >>>>> those OpenSource folks to participate in this easier.
> >>>>> I know of at least one other person who would be willing to join in
> on
> >>>> this
> >>>>> but doesn't have a "sponsor" for it.
> >>>>>
> >>>>> regards, Achim
> >>>>>
> >>>>
> >>>> Thank you for your feedback Achim. There's no simple solution here as
> >> I'm
> >>>> sure you can guess. However, I certainly will keep this in mind.
> >>>>
> >>>> - Ray
> >>>>
> >>>>
> >>>>>
> >>>>>
> >>>>> 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> >>>>>
> >>>>>> On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
> >>>>>> thomas.driessen@ds-lab.org> wrote:
> >>>>>>
> >>>>>>>
> >>>>>>> Two small notes:
> >>>>>>> 1) the mentioned property "osgi.http.whiteboard.listener" is never
> >>>>>>> mentioned in RFC-189 -> should it be mentioned?
> >>>>>>>
> >>>>>>
> >>>>>> There were many refinements made to the spec after progressing from
> >> the
> >>>>> RFP
> >>>>>> stage.
> >>>>>>
> >>>>>> Unfortunately since there isn't a public document for the draft spec
> >>>> yet
> >>>>>> (hopefully pretty soon) you'll have to take our word for it, sorry!
> :(
> >>>>>>
> >>>>>> Secondly, since the CT for the RI (felix http) isn't complete yet,
> >> it's
> >>>>>> possible that felix http is not yet working quite as expected.
> >>>>>>
> >>>>>> [Switching to Appeal mode]
> >>>>>> Sadly, this is due to not having the desired number of people
> >> available
> >>>>> in
> >>>>>> the alliance to get all this great work done in a timely fashion
> (and
> >> I
> >>>>>> assure you it's very great work, with more exciting work coming down
> >>>> the
> >>>>>> line)!
> >>>>>>
> >>>>>> I encourage everyone to step up and join the OSGi Alliance to get
> this
> >>>>> work
> >>>>>> progressing faster. To a very large degree this is the limiting
> factor
> >>>>> for
> >>>>>> why spec progression is slow).
> >>>>>> [End Appeal mode]
> >>>>>>
> >>>>>> Sincerely,
> >>>>>> - Ray (disclosure, I'm a board member and co-chair of the EEG)
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>>
> >>>>> Apache Member
> >>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> >> Committer
> >>>> &
> >>>>> Project Lead
> >>>>> blog <http://notizblog.nierbeck.de/>
> >>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >>>>>
> >>>>> Software Architect / Project Manager / Scrum Master
> >>>>>
> >>>>
> >>>>
> >>>>
> >>>> --
> >>>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> >>>>  (@rotty3000)
> >>>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> >>>>  (@Liferay)
> >>>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> >>>> (@OSGiAlliance)
> >>>>
> >>>
> >>>
> >>>
> >>
> >>
> >> --
> >> Carsten Ziegeler
> >> Adobe Research Switzerland
> >> cziegeler@apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 13.05.15 um 14:28 schrieb Thomas Driessen:
> Hey Carsten,
> 
> I'm glad to hear it's been such an easy fix :)
> So if I pull the repository from github.com/apache/felix, then which
> bundles do I have to update?
> Right now I only see changes in the configadmin.

THe change is in http/base, so you need to build http/base and then
http/jetty and update that bundle

Revision is 1679184

Carsten

> 
> Best regards,
> Thomas
> 
> 2015-05-13 14:12 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> 
>> Thanks for the test code, it's actually a bug in the implementation. If
>> the listener is registered after the context (which is always true for
>> the default context), it was never called.
>> I just committed a fix for this
>>
>> Regards
>> Carsten
>>
>> Am 13.05.15 um 11:53 schrieb Thomas Driessen:
>>> Hi Ray,
>>>
>>> I've now the same setup as you posted it but it still doesn't work :( No
>>> Sysouts are printed on my console for contextInitialized.
>>>
>>> I've copied the Testsetup to my Google Drive, so if you want you could
>> have
>>> a look on it:
>>>
>>>
>> https://drive.google.com/folderview?id=0Bw1daHW2hcyZWFhlcldtdGV6alE&usp=sharing
>>>
>>> Best regards,
>>> Thomas
>>>
>>> 2015-05-12 22:33 GMT+02:00 Raymond Auge <ra...@liferay.com>:
>>>
>>>> On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <
>> bcanhome@googlemail.com>
>>>> wrote:
>>>>
>>>>> Hi Ray,
>>>>>
>>>>> even though it might be a bit off-topic, but you started it ;)
>>>>>
>>>>> I encourage everyone to step up and join the OSGi Alliance to get this
>>>> work
>>>>>> progressing faster. To a very large degree this is the limiting factor
>>>>> for
>>>>>> why spec progression is slow).
>>>>>
>>>>>
>>>>> For someone like me who only works on the OSGi related stuff like Pax
>> Web
>>>>> (btw. ServletContextListener work without any issues with it, it's just
>>>> not
>>>>> yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
>>>>> join. There are a couple people out there with great ideas, but can't
>>>> join
>>>>> cause they don't work a company that is interested in funding such
>>>>> involvement. Maybe you as a board member and co-chair for the EEG can
>>>> help
>>>>> those OpenSource folks to participate in this easier.
>>>>> I know of at least one other person who would be willing to join in on
>>>> this
>>>>> but doesn't have a "sponsor" for it.
>>>>>
>>>>> regards, Achim
>>>>>
>>>>
>>>> Thank you for your feedback Achim. There's no simple solution here as
>> I'm
>>>> sure you can guess. However, I certainly will keep this in mind.
>>>>
>>>> - Ray
>>>>
>>>>
>>>>>
>>>>>
>>>>> 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
>>>>>
>>>>>> On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
>>>>>> thomas.driessen@ds-lab.org> wrote:
>>>>>>
>>>>>>>
>>>>>>> Two small notes:
>>>>>>> 1) the mentioned property "osgi.http.whiteboard.listener" is never
>>>>>>> mentioned in RFC-189 -> should it be mentioned?
>>>>>>>
>>>>>>
>>>>>> There were many refinements made to the spec after progressing from
>> the
>>>>> RFP
>>>>>> stage.
>>>>>>
>>>>>> Unfortunately since there isn't a public document for the draft spec
>>>> yet
>>>>>> (hopefully pretty soon) you'll have to take our word for it, sorry! :(
>>>>>>
>>>>>> Secondly, since the CT for the RI (felix http) isn't complete yet,
>> it's
>>>>>> possible that felix http is not yet working quite as expected.
>>>>>>
>>>>>> [Switching to Appeal mode]
>>>>>> Sadly, this is due to not having the desired number of people
>> available
>>>>> in
>>>>>> the alliance to get all this great work done in a timely fashion (and
>> I
>>>>>> assure you it's very great work, with more exciting work coming down
>>>> the
>>>>>> line)!
>>>>>>
>>>>>> I encourage everyone to step up and join the OSGi Alliance to get this
>>>>> work
>>>>>> progressing faster. To a very large degree this is the limiting factor
>>>>> for
>>>>>> why spec progression is slow).
>>>>>> [End Appeal mode]
>>>>>>
>>>>>> Sincerely,
>>>>>> - Ray (disclosure, I'm a board member and co-chair of the EEG)
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Apache Member
>>>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
>> Committer
>>>> &
>>>>> Project Lead
>>>>> blog <http://notizblog.nierbeck.de/>
>>>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>>>
>>>>> Software Architect / Project Manager / Scrum Master
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>>>>  (@rotty3000)
>>>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>>>>  (@Liferay)
>>>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>>>> (@OSGiAlliance)
>>>>
>>>
>>>
>>>
>>
>>
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hey Carsten,

I'm glad to hear it's been such an easy fix :)
So if I pull the repository from github.com/apache/felix, then which
bundles do I have to update?
Right now I only see changes in the configadmin.

Best regards,
Thomas

2015-05-13 14:12 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Thanks for the test code, it's actually a bug in the implementation. If
> the listener is registered after the context (which is always true for
> the default context), it was never called.
> I just committed a fix for this
>
> Regards
> Carsten
>
> Am 13.05.15 um 11:53 schrieb Thomas Driessen:
> > Hi Ray,
> >
> > I've now the same setup as you posted it but it still doesn't work :( No
> > Sysouts are printed on my console for contextInitialized.
> >
> > I've copied the Testsetup to my Google Drive, so if you want you could
> have
> > a look on it:
> >
> >
> https://drive.google.com/folderview?id=0Bw1daHW2hcyZWFhlcldtdGV6alE&usp=sharing
> >
> > Best regards,
> > Thomas
> >
> > 2015-05-12 22:33 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> >
> >> On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <
> bcanhome@googlemail.com>
> >> wrote:
> >>
> >>> Hi Ray,
> >>>
> >>> even though it might be a bit off-topic, but you started it ;)
> >>>
> >>> I encourage everyone to step up and join the OSGi Alliance to get this
> >> work
> >>>> progressing faster. To a very large degree this is the limiting factor
> >>> for
> >>>> why spec progression is slow).
> >>>
> >>>
> >>> For someone like me who only works on the OSGi related stuff like Pax
> Web
> >>> (btw. ServletContextListener work without any issues with it, it's just
> >> not
> >>> yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
> >>> join. There are a couple people out there with great ideas, but can't
> >> join
> >>> cause they don't work a company that is interested in funding such
> >>> involvement. Maybe you as a board member and co-chair for the EEG can
> >> help
> >>> those OpenSource folks to participate in this easier.
> >>> I know of at least one other person who would be willing to join in on
> >> this
> >>> but doesn't have a "sponsor" for it.
> >>>
> >>> regards, Achim
> >>>
> >>
> >> Thank you for your feedback Achim. There's no simple solution here as
> I'm
> >> sure you can guess. However, I certainly will keep this in mind.
> >>
> >> - Ray
> >>
> >>
> >>>
> >>>
> >>> 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> >>>
> >>>> On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
> >>>> thomas.driessen@ds-lab.org> wrote:
> >>>>
> >>>>>
> >>>>> Two small notes:
> >>>>> 1) the mentioned property "osgi.http.whiteboard.listener" is never
> >>>>> mentioned in RFC-189 -> should it be mentioned?
> >>>>>
> >>>>
> >>>> There were many refinements made to the spec after progressing from
> the
> >>> RFP
> >>>> stage.
> >>>>
> >>>> Unfortunately since there isn't a public document for the draft spec
> >> yet
> >>>> (hopefully pretty soon) you'll have to take our word for it, sorry! :(
> >>>>
> >>>> Secondly, since the CT for the RI (felix http) isn't complete yet,
> it's
> >>>> possible that felix http is not yet working quite as expected.
> >>>>
> >>>> [Switching to Appeal mode]
> >>>> Sadly, this is due to not having the desired number of people
> available
> >>> in
> >>>> the alliance to get all this great work done in a timely fashion (and
> I
> >>>> assure you it's very great work, with more exciting work coming down
> >> the
> >>>> line)!
> >>>>
> >>>> I encourage everyone to step up and join the OSGi Alliance to get this
> >>> work
> >>>> progressing faster. To a very large degree this is the limiting factor
> >>> for
> >>>> why spec progression is slow).
> >>>> [End Appeal mode]
> >>>>
> >>>> Sincerely,
> >>>> - Ray (disclosure, I'm a board member and co-chair of the EEG)
> >>>>
> >>>
> >>>
> >>>
> >>> --
> >>>
> >>> Apache Member
> >>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> >>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
> Committer
> >> &
> >>> Project Lead
> >>> blog <http://notizblog.nierbeck.de/>
> >>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >>>
> >>> Software Architect / Project Manager / Scrum Master
> >>>
> >>
> >>
> >>
> >> --
> >> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> >>  (@rotty3000)
> >> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> >>  (@Liferay)
> >> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> >> (@OSGiAlliance)
> >>
> >
> >
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Thanks for the test code, it's actually a bug in the implementation. If
the listener is registered after the context (which is always true for
the default context), it was never called.
I just committed a fix for this

Regards
Carsten

Am 13.05.15 um 11:53 schrieb Thomas Driessen:
> Hi Ray,
> 
> I've now the same setup as you posted it but it still doesn't work :( No
> Sysouts are printed on my console for contextInitialized.
> 
> I've copied the Testsetup to my Google Drive, so if you want you could have
> a look on it:
> 
> https://drive.google.com/folderview?id=0Bw1daHW2hcyZWFhlcldtdGV6alE&usp=sharing
> 
> Best regards,
> Thomas
> 
> 2015-05-12 22:33 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> 
>> On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <bc...@googlemail.com>
>> wrote:
>>
>>> Hi Ray,
>>>
>>> even though it might be a bit off-topic, but you started it ;)
>>>
>>> I encourage everyone to step up and join the OSGi Alliance to get this
>> work
>>>> progressing faster. To a very large degree this is the limiting factor
>>> for
>>>> why spec progression is slow).
>>>
>>>
>>> For someone like me who only works on the OSGi related stuff like Pax Web
>>> (btw. ServletContextListener work without any issues with it, it's just
>> not
>>> yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
>>> join. There are a couple people out there with great ideas, but can't
>> join
>>> cause they don't work a company that is interested in funding such
>>> involvement. Maybe you as a board member and co-chair for the EEG can
>> help
>>> those OpenSource folks to participate in this easier.
>>> I know of at least one other person who would be willing to join in on
>> this
>>> but doesn't have a "sponsor" for it.
>>>
>>> regards, Achim
>>>
>>
>> Thank you for your feedback Achim. There's no simple solution here as I'm
>> sure you can guess. However, I certainly will keep this in mind.
>>
>> - Ray
>>
>>
>>>
>>>
>>> 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
>>>
>>>> On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
>>>> thomas.driessen@ds-lab.org> wrote:
>>>>
>>>>>
>>>>> Two small notes:
>>>>> 1) the mentioned property "osgi.http.whiteboard.listener" is never
>>>>> mentioned in RFC-189 -> should it be mentioned?
>>>>>
>>>>
>>>> There were many refinements made to the spec after progressing from the
>>> RFP
>>>> stage.
>>>>
>>>> Unfortunately since there isn't a public document for the draft spec
>> yet
>>>> (hopefully pretty soon) you'll have to take our word for it, sorry! :(
>>>>
>>>> Secondly, since the CT for the RI (felix http) isn't complete yet, it's
>>>> possible that felix http is not yet working quite as expected.
>>>>
>>>> [Switching to Appeal mode]
>>>> Sadly, this is due to not having the desired number of people available
>>> in
>>>> the alliance to get all this great work done in a timely fashion (and I
>>>> assure you it's very great work, with more exciting work coming down
>> the
>>>> line)!
>>>>
>>>> I encourage everyone to step up and join the OSGi Alliance to get this
>>> work
>>>> progressing faster. To a very large degree this is the limiting factor
>>> for
>>>> why spec progression is slow).
>>>> [End Appeal mode]
>>>>
>>>> Sincerely,
>>>> - Ray (disclosure, I'm a board member and co-chair of the EEG)
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Apache Member
>>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> &
>>> Project Lead
>>> blog <http://notizblog.nierbeck.de/>
>>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>>
>>> Software Architect / Project Manager / Scrum Master
>>>
>>
>>
>>
>> --
>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>>  (@rotty3000)
>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>>  (@Liferay)
>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>> (@OSGiAlliance)
>>
> 
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hi Ray,

I've now the same setup as you posted it but it still doesn't work :( No
Sysouts are printed on my console for contextInitialized.

I've copied the Testsetup to my Google Drive, so if you want you could have
a look on it:

https://drive.google.com/folderview?id=0Bw1daHW2hcyZWFhlcldtdGV6alE&usp=sharing

Best regards,
Thomas

2015-05-12 22:33 GMT+02:00 Raymond Auge <ra...@liferay.com>:

> On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <bc...@googlemail.com>
> wrote:
>
> > Hi Ray,
> >
> > even though it might be a bit off-topic, but you started it ;)
> >
> > I encourage everyone to step up and join the OSGi Alliance to get this
> work
> > > progressing faster. To a very large degree this is the limiting factor
> > for
> > > why spec progression is slow).
> >
> >
> > For someone like me who only works on the OSGi related stuff like Pax Web
> > (btw. ServletContextListener work without any issues with it, it's just
> not
> > yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
> > join. There are a couple people out there with great ideas, but can't
> join
> > cause they don't work a company that is interested in funding such
> > involvement. Maybe you as a board member and co-chair for the EEG can
> help
> > those OpenSource folks to participate in this easier.
> > I know of at least one other person who would be willing to join in on
> this
> > but doesn't have a "sponsor" for it.
> >
> > regards, Achim
> >
>
> Thank you for your feedback Achim. There's no simple solution here as I'm
> sure you can guess. However, I certainly will keep this in mind.
>
> - Ray
>
>
> >
> >
> > 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
> >
> > > On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
> > > thomas.driessen@ds-lab.org> wrote:
> > >
> > > >
> > > > Two small notes:
> > > > 1) the mentioned property "osgi.http.whiteboard.listener" is never
> > > > mentioned in RFC-189 -> should it be mentioned?
> > > >
> > >
> > > There were many refinements made to the spec after progressing from the
> > RFP
> > > stage.
> > >
> > > Unfortunately since there isn't a public document for the draft spec
> yet
> > > (hopefully pretty soon) you'll have to take our word for it, sorry! :(
> > >
> > > Secondly, since the CT for the RI (felix http) isn't complete yet, it's
> > > possible that felix http is not yet working quite as expected.
> > >
> > > [Switching to Appeal mode]
> > > Sadly, this is due to not having the desired number of people available
> > in
> > > the alliance to get all this great work done in a timely fashion (and I
> > > assure you it's very great work, with more exciting work coming down
> the
> > > line)!
> > >
> > > I encourage everyone to step up and join the OSGi Alliance to get this
> > work
> > > progressing faster. To a very large degree this is the limiting factor
> > for
> > > why spec progression is slow).
> > > [End Appeal mode]
> > >
> > > Sincerely,
> > > - Ray (disclosure, I'm a board member and co-chair of the EEG)
> > >
> >
> >
> >
> > --
> >
> > Apache Member
> > Apache Karaf <http://karaf.apache.org/> Committer & PMC
> > OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
> &
> > Project Lead
> > blog <http://notizblog.nierbeck.de/>
> > Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
> >
> > Software Architect / Project Manager / Scrum Master
> >
>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>



-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Raymond Auge <ra...@liferay.com>.
On Tue, May 12, 2015 at 11:28 AM, Achim Nierbeck <bc...@googlemail.com>
wrote:

> Hi Ray,
>
> even though it might be a bit off-topic, but you started it ;)
>
> I encourage everyone to step up and join the OSGi Alliance to get this work
> > progressing faster. To a very large degree this is the limiting factor
> for
> > why spec progression is slow).
>
>
> For someone like me who only works on the OSGi related stuff like Pax Web
> (btw. ServletContextListener work without any issues with it, it's just not
> yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
> join. There are a couple people out there with great ideas, but can't join
> cause they don't work a company that is interested in funding such
> involvement. Maybe you as a board member and co-chair for the EEG can help
> those OpenSource folks to participate in this easier.
> I know of at least one other person who would be willing to join in on this
> but doesn't have a "sponsor" for it.
>
> regards, Achim
>

Thank you for your feedback Achim. There's no simple solution here as I'm
sure you can guess. However, I certainly will keep this in mind.

- Ray


>
>
> 2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:
>
> > On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
> > thomas.driessen@ds-lab.org> wrote:
> >
> > >
> > > Two small notes:
> > > 1) the mentioned property "osgi.http.whiteboard.listener" is never
> > > mentioned in RFC-189 -> should it be mentioned?
> > >
> >
> > There were many refinements made to the spec after progressing from the
> RFP
> > stage.
> >
> > Unfortunately since there isn't a public document for the draft spec yet
> > (hopefully pretty soon) you'll have to take our word for it, sorry! :(
> >
> > Secondly, since the CT for the RI (felix http) isn't complete yet, it's
> > possible that felix http is not yet working quite as expected.
> >
> > [Switching to Appeal mode]
> > Sadly, this is due to not having the desired number of people available
> in
> > the alliance to get all this great work done in a timely fashion (and I
> > assure you it's very great work, with more exciting work coming down the
> > line)!
> >
> > I encourage everyone to step up and join the OSGi Alliance to get this
> work
> > progressing faster. To a very large degree this is the limiting factor
> for
> > why spec progression is slow).
> > [End Appeal mode]
> >
> > Sincerely,
> > - Ray (disclosure, I'm a board member and co-chair of the EEG)
> >
>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: ServletContextListener

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Ray,

even though it might be a bit off-topic, but you started it ;)

I encourage everyone to step up and join the OSGi Alliance to get this work
> progressing faster. To a very large degree this is the limiting factor for
> why spec progression is slow).


For someone like me who only works on the OSGi related stuff like Pax Web
(btw. ServletContextListener work without any issues with it, it's just not
yet R6 compliant :-) ) and Karaf in his spare time, it's pretty hard to
join. There are a couple people out there with great ideas, but can't join
cause they don't work a company that is interested in funding such
involvement. Maybe you as a board member and co-chair for the EEG can help
those OpenSource folks to participate in this easier.
I know of at least one other person who would be willing to join in on this
but doesn't have a "sponsor" for it.

regards, Achim


2015-05-12 17:18 GMT+02:00 Raymond Auge <ra...@liferay.com>:

> On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
> thomas.driessen@ds-lab.org> wrote:
>
> >
> > Two small notes:
> > 1) the mentioned property "osgi.http.whiteboard.listener" is never
> > mentioned in RFC-189 -> should it be mentioned?
> >
>
> There were many refinements made to the spec after progressing from the RFP
> stage.
>
> Unfortunately since there isn't a public document for the draft spec yet
> (hopefully pretty soon) you'll have to take our word for it, sorry! :(
>
> Secondly, since the CT for the RI (felix http) isn't complete yet, it's
> possible that felix http is not yet working quite as expected.
>
> [Switching to Appeal mode]
> Sadly, this is due to not having the desired number of people available in
> the alliance to get all this great work done in a timely fashion (and I
> assure you it's very great work, with more exciting work coming down the
> line)!
>
> I encourage everyone to step up and join the OSGi Alliance to get this work
> progressing faster. To a very large degree this is the limiting factor for
> why spec progression is slow).
> [End Appeal mode]
>
> Sincerely,
> - Ray (disclosure, I'm a board member and co-chair of the EEG)
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: ServletContextListener

Posted by Raymond Auge <ra...@liferay.com>.
On Tue, May 12, 2015 at 10:56 AM, Thomas Driessen <
thomas.driessen@ds-lab.org> wrote:

>
> Two small notes:
> 1) the mentioned property "osgi.http.whiteboard.listener" is never
> mentioned in RFC-189 -> should it be mentioned?
>

There were many refinements made to the spec after progressing from the RFP
stage.

Unfortunately since there isn't a public document for the draft spec yet
(hopefully pretty soon) you'll have to take our word for it, sorry! :(

Secondly, since the CT for the RI (felix http) isn't complete yet, it's
possible that felix http is not yet working quite as expected.

[Switching to Appeal mode]
Sadly, this is due to not having the desired number of people available in
the alliance to get all this great work done in a timely fashion (and I
assure you it's very great work, with more exciting work coming down the
line)!

I encourage everyone to step up and join the OSGi Alliance to get this work
progressing faster. To a very large degree this is the limiting factor for
why spec progression is slow).
[End Appeal mode]

Sincerely,
- Ray (disclosure, I'm a board member and co-chair of the EEG)

Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
It would be great if you could provide a simple test setup we can check.
I think the listener should work in the current version.

Regards
Carsten

Am 12.05.15 um 16:56 schrieb Thomas Driessen:
> Hey,
> 
> First: Thanks for all your advices.
> 
> I tried the Property as Pierre mentioned, but still my setup is not
> recognizing my SCL.
> I'll copy my console printout so maybe you can spot something wrong with my
> setup:
> 
> 
> 2015-05-12 16:32:38.153:INFO::main: Logging initialized @998ms
> 2015-05-12 16:32:38.193:INFO:oejs.Server:main: jetty-9.2.9.v20150224
> ____________________________
> Welcome to Apache Felix Gogo
> 
> g! 2015-05-12 16:32:38.254:INFO:oejsh.ContextHandler:main: Started
> o.e.j.s.ServletContextHandler@7c417213{/,null,AVAILABLE}
> 2015-05-12 16:32:38.254:INFO:oejs.Server:main: Started @1092ms
> 2015-05-12 16:32:38.325:INFO:oejs.ServerConnector:main: Started
> ServerConnector@7b355613{HTTP/1.1}{0.0.0.0:8080}
> [INFO] Started Jetty 9.2.9.v20150224 at port(s) HTTP:8080 on context path /
> Hello
> lb
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (5.1.0.SNAPSHOT)
>     1|Active     |    1|Apache Felix Configuration Admin Service (1.8.0)
>     2|Active     |    1|Apache Felix Dependency Manager (4.0.1)
>     3|Active     |    1|Apache Felix Dependency Manager Runtime (4.0.1)
>     4|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)
>     5|Active     |    1|Apache Felix Gogo Command (0.14.0)
>     6|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
>     7|Active     |    1|Apache Felix Gogo Shell (0.10.0)
>     8|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
>     9|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
>    10|Active     |    1|Apache Felix Servlet API (1.1.0)
>    11|Active     |    1|osgi.enterprise (4.2.0.201003190513)
>    12|Active     |    1|osgi.residential (4.3.0.201111022239)
>    13|Active     |    1|testit.test (0.0.0.201505121432)
> g! dm
> [3] org.apache.felix.dependencymanager.runtime
>  [0] org.apache.felix.dm.runtime.DependencyManagerRuntime registered
>     active (DependencyManager-Component=*) bundle optional available
>     org.osgi.service.packageadmin.PackageAdmin service required available
>     org.osgi.service.log.LogService service optional unavailable
> [13] testit.test
>  [1]
> javax.servlet.ServletContextListener(osgi.http.whiteboard.listener=true)
> registered
> 
> Bundle [13] is merely my SCL:
> 
> @Component(properties =
> @Property(name="osgi.http.whiteboard.listener",value="true"))
> public class MyContextListener implements ServletContextListener {
> 
> @Override
> public void contextDestroyed(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextDestroyed()");
> }
> 
> @Override
> public void contextInitialized(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextInitialized()");
> }
>  @Start
> public void start(){
> System.out.println("Hello");
> }
> }
> 
> 
> I tried the same Setup with http.whiteboard and http.basic explicitly added
> to my runrequirements, but neihter of those worked.
> 
> 
> Two small notes:
> 1) the mentioned property "osgi.http.whiteboard.listener" is never
> mentioned in RFC-189 -> should it be mentioned?
> 2) Two dependency chains of http.jetty.3.0.3.SNAPSHOT leads to two jetty
> bundles being automatically resolved by bndtools.
> 
> The 1st chain is: jetty.3.0.3 -> org.osgi.metatype.1.1.0 ->
> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
> The 2nd chain is: jetty.3.0.3 -> org.osgi.useradmin.1.1.0 ->
> osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
> 
> Is this an intended behaviour?
> 
> Best regards ant thanks for your patience,
> Thomas
> 
> 2015-05-12 15:43 GMT+02:00 Pierre De Rop <pi...@gmail.com>:
> 
>> Hello Thomas,
>>
>> if you are using DM annotations, you can try to add the service property
>> mentioned by Raymond using the following:
>>
>> @Component(properties = @Property(name = "osgi.http.whiteboard.listener",
>> value = "true"))
>> public class MyContextListener implements ServletContextListener {
>> ...
>> }
>>
>> And if your component also depends on other services, you might also need
>> to check proper activation of your component using the "dm" shell
>> command,like "dm b <bundle id>".
>>
>> hope this helps;
>> /Pierre
>>
>> On Tue, May 12, 2015 at 3:09 PM, Raymond Auge <ra...@liferay.com>
>> wrote:
>>
>>> You are missing the required service property
>>> "osgi.http.whiteboard.listener=true" on your SCL.
>>>
>>> Sincerely,
>>> - Ray
>>>
>>> On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <
>>> thomas.driessen@ds-lab.org
>>>> wrote:
>>>
>>>> Hi Carsten,
>>>>
>>>> forget my last question, I still used felix 4.4.1 as my OSGI
>> Framework. I
>>>> switched this to 5.1.0.SNAPSHOT and everything got resolved as
>> expected.
>>>>
>>>> But still my ServletContextListener seems not to be invoked, as i get
>> no
>>>> outputs on contextInitialized.
>>>>
>>>> This is my ServletContextListener:
>>>>
>>>> @Component(provides=ServletContextListener.class)
>>>> public class MyContextListener implements ServletContextListener {
>>>>
>>>> @Override
>>>> public void contextDestroyed(ServletContextEvent arg0) {
>>>> // TODO Auto-generated method stub
>>>> System.out.println("MyContextListener.contextDestroyed()");
>>>> }
>>>>
>>>> @Override
>>>> public void contextInitialized(ServletContextEvent arg0) {
>>>> // TODO Auto-generated method stub
>>>> System.out.println("MyContextListener.contextInitialized()");
>>>> }
>>>> }
>>>>
>>>> Might it be that the DM-Annotations are not working? Or do I have to
>> add
>>>> some attributes?
>>>> Sorry for all those questions but right now I'm pretty confused :(
>>>>
>>>> Thanks for all your advice :)
>>>>
>>>> Thomas
>>>>
>>>> 2015-05-12 12:08 GMT+02:00 Thomas Driessen <thomas.driessen@ds-lab.org
>>> :
>>>>
>>>>> Hi Carsten,
>>>>>
>>>>> I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to
>> my
>>>>> runrequirements but now it says it is missing the package
>> org.osgi.dto
>>> ?
>>>>> I tried to add org.osgi.core (6.0.0) but that didn't help.
>>>>>
>>>>> Do I have to add some other bundles on which http.jetty and http.api
>>> are
>>>>> relying?
>>>>>
>>>>> Thomas
>>>>>
>>>>> 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
>>>>>
>>>>>> Am 11.05.15 um 18:51 schrieb Scott Lewis:
>>>>>>> On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
>>>>>>>> <stuff deleted>
>>>>>>>> Is there a release scheduled that will include all the http
>> service
>>>>>>>> changes for R6 final?
>>>>>>>>
>>>>>>>> Yes, once there is an official final R6 version, we can do a
>>> release.
>>>>>>>
>>>>>>> Any schedule around such a release?   I know that the R6 spec is
>> not
>>>>>>> done/approved/frozen, etc., but I'm just asking what plans exist.
>>>>>>>
>>>>>> I assume somewhere in Q3
>>>>>>
>>>>>> Carsten
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Carsten Ziegeler
>>>>>> Adobe Research Switzerland
>>>>>> cziegeler@apache.org
>>>>>>
>>>>>>
>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> M.Sc. Thomas Driessen
>>>>> Software Methodologies for Distributed Systems
>>>>> Institute of Computer Science
>>>>> University of Augsburg
>>>>> Universitätsstr. 6a
>>>>> 86135 Augsburg, Germany
>>>>>
>>>>> Tel:    +49 821 598-2486
>>>>> email: thomas.driessen@informatik.uni-augsburg.de
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> M.Sc. Thomas Driessen
>>>> Software Methodologies for Distributed Systems
>>>> Institute of Computer Science
>>>> University of Augsburg
>>>> Universitätsstr. 6a
>>>> 86135 Augsburg, Germany
>>>>
>>>> Tel:    +49 821 598-2486
>>>> email: thomas.driessen@informatik.uni-augsburg.de
>>>>
>>>
>>>
>>>
>>> --
>>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>>>  (@rotty3000)
>>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>>>  (@Liferay)
>>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
>>> (@OSGiAlliance)
>>>
>>
> 
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hey,

First: Thanks for all your advices.

I tried the Property as Pierre mentioned, but still my setup is not
recognizing my SCL.
I'll copy my console printout so maybe you can spot something wrong with my
setup:


2015-05-12 16:32:38.153:INFO::main: Logging initialized @998ms
2015-05-12 16:32:38.193:INFO:oejs.Server:main: jetty-9.2.9.v20150224
____________________________
Welcome to Apache Felix Gogo

g! 2015-05-12 16:32:38.254:INFO:oejsh.ContextHandler:main: Started
o.e.j.s.ServletContextHandler@7c417213{/,null,AVAILABLE}
2015-05-12 16:32:38.254:INFO:oejs.Server:main: Started @1092ms
2015-05-12 16:32:38.325:INFO:oejs.ServerConnector:main: Started
ServerConnector@7b355613{HTTP/1.1}{0.0.0.0:8080}
[INFO] Started Jetty 9.2.9.v20150224 at port(s) HTTP:8080 on context path /
Hello
lb
START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (5.1.0.SNAPSHOT)
    1|Active     |    1|Apache Felix Configuration Admin Service (1.8.0)
    2|Active     |    1|Apache Felix Dependency Manager (4.0.1)
    3|Active     |    1|Apache Felix Dependency Manager Runtime (4.0.1)
    4|Active     |    1|Apache Felix Dependency Manager Shell (4.0.1)
    5|Active     |    1|Apache Felix Gogo Command (0.14.0)
    6|Active     |    1|Apache Felix Gogo Runtime (0.10.0)
    7|Active     |    1|Apache Felix Gogo Shell (0.10.0)
    8|Active     |    1|Apache Felix Http Api (3.0.0.SNAPSHOT)
    9|Active     |    1|Apache Felix Http Jetty (3.0.3.SNAPSHOT)
   10|Active     |    1|Apache Felix Servlet API (1.1.0)
   11|Active     |    1|osgi.enterprise (4.2.0.201003190513)
   12|Active     |    1|osgi.residential (4.3.0.201111022239)
   13|Active     |    1|testit.test (0.0.0.201505121432)
g! dm
[3] org.apache.felix.dependencymanager.runtime
 [0] org.apache.felix.dm.runtime.DependencyManagerRuntime registered
    active (DependencyManager-Component=*) bundle optional available
    org.osgi.service.packageadmin.PackageAdmin service required available
    org.osgi.service.log.LogService service optional unavailable
[13] testit.test
 [1]
javax.servlet.ServletContextListener(osgi.http.whiteboard.listener=true)
registered

Bundle [13] is merely my SCL:

@Component(properties =
@Property(name="osgi.http.whiteboard.listener",value="true"))
public class MyContextListener implements ServletContextListener {

@Override
public void contextDestroyed(ServletContextEvent arg0) {
// TODO Auto-generated method stub
System.out.println("MyContextListener.contextDestroyed()");
}

@Override
public void contextInitialized(ServletContextEvent arg0) {
// TODO Auto-generated method stub
System.out.println("MyContextListener.contextInitialized()");
}
 @Start
public void start(){
System.out.println("Hello");
}
}


I tried the same Setup with http.whiteboard and http.basic explicitly added
to my runrequirements, but neihter of those worked.


Two small notes:
1) the mentioned property "osgi.http.whiteboard.listener" is never
mentioned in RFC-189 -> should it be mentioned?
2) Two dependency chains of http.jetty.3.0.3.SNAPSHOT leads to two jetty
bundles being automatically resolved by bndtools.

The 1st chain is: jetty.3.0.3 -> org.osgi.metatype.1.1.0 ->
osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2
The 2nd chain is: jetty.3.0.3 -> org.osgi.useradmin.1.1.0 ->
osgi.enterprise.4.2.0 ->  felix.http.jetty.2.2.2

Is this an intended behaviour?

Best regards ant thanks for your patience,
Thomas

2015-05-12 15:43 GMT+02:00 Pierre De Rop <pi...@gmail.com>:

> Hello Thomas,
>
> if you are using DM annotations, you can try to add the service property
> mentioned by Raymond using the following:
>
> @Component(properties = @Property(name = "osgi.http.whiteboard.listener",
> value = "true"))
> public class MyContextListener implements ServletContextListener {
> ...
> }
>
> And if your component also depends on other services, you might also need
> to check proper activation of your component using the "dm" shell
> command,like "dm b <bundle id>".
>
> hope this helps;
> /Pierre
>
> On Tue, May 12, 2015 at 3:09 PM, Raymond Auge <ra...@liferay.com>
> wrote:
>
> > You are missing the required service property
> > "osgi.http.whiteboard.listener=true" on your SCL.
> >
> > Sincerely,
> > - Ray
> >
> > On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <
> > thomas.driessen@ds-lab.org
> > > wrote:
> >
> > > Hi Carsten,
> > >
> > > forget my last question, I still used felix 4.4.1 as my OSGI
> Framework. I
> > > switched this to 5.1.0.SNAPSHOT and everything got resolved as
> expected.
> > >
> > > But still my ServletContextListener seems not to be invoked, as i get
> no
> > > outputs on contextInitialized.
> > >
> > > This is my ServletContextListener:
> > >
> > > @Component(provides=ServletContextListener.class)
> > > public class MyContextListener implements ServletContextListener {
> > >
> > > @Override
> > > public void contextDestroyed(ServletContextEvent arg0) {
> > > // TODO Auto-generated method stub
> > > System.out.println("MyContextListener.contextDestroyed()");
> > > }
> > >
> > > @Override
> > > public void contextInitialized(ServletContextEvent arg0) {
> > > // TODO Auto-generated method stub
> > > System.out.println("MyContextListener.contextInitialized()");
> > > }
> > > }
> > >
> > > Might it be that the DM-Annotations are not working? Or do I have to
> add
> > > some attributes?
> > > Sorry for all those questions but right now I'm pretty confused :(
> > >
> > > Thanks for all your advice :)
> > >
> > > Thomas
> > >
> > > 2015-05-12 12:08 GMT+02:00 Thomas Driessen <thomas.driessen@ds-lab.org
> >:
> > >
> > > > Hi Carsten,
> > > >
> > > > I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to
> my
> > > > runrequirements but now it says it is missing the package
> org.osgi.dto
> > ?
> > > > I tried to add org.osgi.core (6.0.0) but that didn't help.
> > > >
> > > > Do I have to add some other bundles on which http.jetty and http.api
> > are
> > > > relying?
> > > >
> > > > Thomas
> > > >
> > > > 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> > > >
> > > >> Am 11.05.15 um 18:51 schrieb Scott Lewis:
> > > >> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> > > >> >> <stuff deleted>
> > > >> >> Is there a release scheduled that will include all the http
> service
> > > >> >> changes for R6 final?
> > > >> >>
> > > >> >> Yes, once there is an official final R6 version, we can do a
> > release.
> > > >> >
> > > >> > Any schedule around such a release?   I know that the R6 spec is
> not
> > > >> > done/approved/frozen, etc., but I'm just asking what plans exist.
> > > >> >
> > > >> I assume somewhere in Q3
> > > >>
> > > >> Carsten
> > > >>
> > > >>
> > > >> --
> > > >> Carsten Ziegeler
> > > >> Adobe Research Switzerland
> > > >> cziegeler@apache.org
> > > >>
> > > >>
> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > > >> For additional commands, e-mail: users-help@felix.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > > > --
> > > > M.Sc. Thomas Driessen
> > > > Software Methodologies for Distributed Systems
> > > > Institute of Computer Science
> > > > University of Augsburg
> > > > Universitätsstr. 6a
> > > > 86135 Augsburg, Germany
> > > >
> > > > Tel:    +49 821 598-2486
> > > > email: thomas.driessen@informatik.uni-augsburg.de
> > > >
> > >
> > >
> > >
> > > --
> > > M.Sc. Thomas Driessen
> > > Software Methodologies for Distributed Systems
> > > Institute of Computer Science
> > > University of Augsburg
> > > Universitätsstr. 6a
> > > 86135 Augsburg, Germany
> > >
> > > Tel:    +49 821 598-2486
> > > email: thomas.driessen@informatik.uni-augsburg.de
> > >
> >
> >
> >
> > --
> > *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
> >  (@rotty3000)
> > Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
> >  (@Liferay)
> > Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> > (@OSGiAlliance)
> >
>



-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Pierre De Rop <pi...@gmail.com>.
Hello Thomas,

if you are using DM annotations, you can try to add the service property
mentioned by Raymond using the following:

@Component(properties = @Property(name = "osgi.http.whiteboard.listener",
value = "true"))
public class MyContextListener implements ServletContextListener {
...
}

And if your component also depends on other services, you might also need
to check proper activation of your component using the "dm" shell
command,like "dm b <bundle id>".

hope this helps;
/Pierre

On Tue, May 12, 2015 at 3:09 PM, Raymond Auge <ra...@liferay.com>
wrote:

> You are missing the required service property
> "osgi.http.whiteboard.listener=true" on your SCL.
>
> Sincerely,
> - Ray
>
> On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <
> thomas.driessen@ds-lab.org
> > wrote:
>
> > Hi Carsten,
> >
> > forget my last question, I still used felix 4.4.1 as my OSGI Framework. I
> > switched this to 5.1.0.SNAPSHOT and everything got resolved as expected.
> >
> > But still my ServletContextListener seems not to be invoked, as i get no
> > outputs on contextInitialized.
> >
> > This is my ServletContextListener:
> >
> > @Component(provides=ServletContextListener.class)
> > public class MyContextListener implements ServletContextListener {
> >
> > @Override
> > public void contextDestroyed(ServletContextEvent arg0) {
> > // TODO Auto-generated method stub
> > System.out.println("MyContextListener.contextDestroyed()");
> > }
> >
> > @Override
> > public void contextInitialized(ServletContextEvent arg0) {
> > // TODO Auto-generated method stub
> > System.out.println("MyContextListener.contextInitialized()");
> > }
> > }
> >
> > Might it be that the DM-Annotations are not working? Or do I have to add
> > some attributes?
> > Sorry for all those questions but right now I'm pretty confused :(
> >
> > Thanks for all your advice :)
> >
> > Thomas
> >
> > 2015-05-12 12:08 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:
> >
> > > Hi Carsten,
> > >
> > > I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to my
> > > runrequirements but now it says it is missing the package org.osgi.dto
> ?
> > > I tried to add org.osgi.core (6.0.0) but that didn't help.
> > >
> > > Do I have to add some other bundles on which http.jetty and http.api
> are
> > > relying?
> > >
> > > Thomas
> > >
> > > 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> > >
> > >> Am 11.05.15 um 18:51 schrieb Scott Lewis:
> > >> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> > >> >> <stuff deleted>
> > >> >> Is there a release scheduled that will include all the http service
> > >> >> changes for R6 final?
> > >> >>
> > >> >> Yes, once there is an official final R6 version, we can do a
> release.
> > >> >
> > >> > Any schedule around such a release?   I know that the R6 spec is not
> > >> > done/approved/frozen, etc., but I'm just asking what plans exist.
> > >> >
> > >> I assume somewhere in Q3
> > >>
> > >> Carsten
> > >>
> > >>
> > >> --
> > >> Carsten Ziegeler
> > >> Adobe Research Switzerland
> > >> cziegeler@apache.org
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > >> For additional commands, e-mail: users-help@felix.apache.org
> > >>
> > >>
> > >
> > >
> > > --
> > > M.Sc. Thomas Driessen
> > > Software Methodologies for Distributed Systems
> > > Institute of Computer Science
> > > University of Augsburg
> > > Universitätsstr. 6a
> > > 86135 Augsburg, Germany
> > >
> > > Tel:    +49 821 598-2486
> > > email: thomas.driessen@informatik.uni-augsburg.de
> > >
> >
> >
> >
> > --
> > M.Sc. Thomas Driessen
> > Software Methodologies for Distributed Systems
> > Institute of Computer Science
> > University of Augsburg
> > Universitätsstr. 6a
> > 86135 Augsburg, Germany
> >
> > Tel:    +49 821 598-2486
> > email: thomas.driessen@informatik.uni-augsburg.de
> >
>
>
>
> --
> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
>  (@rotty3000)
> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
>  (@Liferay)
> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org>
> (@OSGiAlliance)
>

Re: ServletContextListener

Posted by Raymond Auge <ra...@liferay.com>.
You are missing the required service property
"osgi.http.whiteboard.listener=true" on your SCL.

Sincerely,
- Ray

On Tue, May 12, 2015 at 6:51 AM, Thomas Driessen <thomas.driessen@ds-lab.org
> wrote:

> Hi Carsten,
>
> forget my last question, I still used felix 4.4.1 as my OSGI Framework. I
> switched this to 5.1.0.SNAPSHOT and everything got resolved as expected.
>
> But still my ServletContextListener seems not to be invoked, as i get no
> outputs on contextInitialized.
>
> This is my ServletContextListener:
>
> @Component(provides=ServletContextListener.class)
> public class MyContextListener implements ServletContextListener {
>
> @Override
> public void contextDestroyed(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextDestroyed()");
> }
>
> @Override
> public void contextInitialized(ServletContextEvent arg0) {
> // TODO Auto-generated method stub
> System.out.println("MyContextListener.contextInitialized()");
> }
> }
>
> Might it be that the DM-Annotations are not working? Or do I have to add
> some attributes?
> Sorry for all those questions but right now I'm pretty confused :(
>
> Thanks for all your advice :)
>
> Thomas
>
> 2015-05-12 12:08 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:
>
> > Hi Carsten,
> >
> > I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to my
> > runrequirements but now it says it is missing the package org.osgi.dto ?
> > I tried to add org.osgi.core (6.0.0) but that didn't help.
> >
> > Do I have to add some other bundles on which http.jetty and http.api are
> > relying?
> >
> > Thomas
> >
> > 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> >
> >> Am 11.05.15 um 18:51 schrieb Scott Lewis:
> >> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> >> >> <stuff deleted>
> >> >> Is there a release scheduled that will include all the http service
> >> >> changes for R6 final?
> >> >>
> >> >> Yes, once there is an official final R6 version, we can do a release.
> >> >
> >> > Any schedule around such a release?   I know that the R6 spec is not
> >> > done/approved/frozen, etc., but I'm just asking what plans exist.
> >> >
> >> I assume somewhere in Q3
> >>
> >> Carsten
> >>
> >>
> >> --
> >> Carsten Ziegeler
> >> Adobe Research Switzerland
> >> cziegeler@apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
> >
> >
> > --
> > M.Sc. Thomas Driessen
> > Software Methodologies for Distributed Systems
> > Institute of Computer Science
> > University of Augsburg
> > Universitätsstr. 6a
> > 86135 Augsburg, Germany
> >
> > Tel:    +49 821 598-2486
> > email: thomas.driessen@informatik.uni-augsburg.de
> >
>
>
>
> --
> M.Sc. Thomas Driessen
> Software Methodologies for Distributed Systems
> Institute of Computer Science
> University of Augsburg
> Universitätsstr. 6a
> 86135 Augsburg, Germany
>
> Tel:    +49 821 598-2486
> email: thomas.driessen@informatik.uni-augsburg.de
>



-- 
*Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile>
 (@rotty3000)
Senior Software Architect *Liferay, Inc.* <http://www.liferay.com>
 (@Liferay)
Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> (@OSGiAlliance)

Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hi Carsten,

forget my last question, I still used felix 4.4.1 as my OSGI Framework. I
switched this to 5.1.0.SNAPSHOT and everything got resolved as expected.

But still my ServletContextListener seems not to be invoked, as i get no
outputs on contextInitialized.

This is my ServletContextListener:

@Component(provides=ServletContextListener.class)
public class MyContextListener implements ServletContextListener {

@Override
public void contextDestroyed(ServletContextEvent arg0) {
// TODO Auto-generated method stub
System.out.println("MyContextListener.contextDestroyed()");
}

@Override
public void contextInitialized(ServletContextEvent arg0) {
// TODO Auto-generated method stub
System.out.println("MyContextListener.contextInitialized()");
}
}

Might it be that the DM-Annotations are not working? Or do I have to add
some attributes?
Sorry for all those questions but right now I'm pretty confused :(

Thanks for all your advice :)

Thomas

2015-05-12 12:08 GMT+02:00 Thomas Driessen <th...@ds-lab.org>:

> Hi Carsten,
>
> I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to my
> runrequirements but now it says it is missing the package org.osgi.dto ?
> I tried to add org.osgi.core (6.0.0) but that didn't help.
>
> Do I have to add some other bundles on which http.jetty and http.api are
> relying?
>
> Thomas
>
> 2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
>
>> Am 11.05.15 um 18:51 schrieb Scott Lewis:
>> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
>> >> <stuff deleted>
>> >> Is there a release scheduled that will include all the http service
>> >> changes for R6 final?
>> >>
>> >> Yes, once there is an official final R6 version, we can do a release.
>> >
>> > Any schedule around such a release?   I know that the R6 spec is not
>> > done/approved/frozen, etc., but I'm just asking what plans exist.
>> >
>> I assume somewhere in Q3
>>
>> Carsten
>>
>>
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>
>
> --
> M.Sc. Thomas Driessen
> Software Methodologies for Distributed Systems
> Institute of Computer Science
> University of Augsburg
> Universitätsstr. 6a
> 86135 Augsburg, Germany
>
> Tel:    +49 821 598-2486
> email: thomas.driessen@informatik.uni-augsburg.de
>



-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hi Carsten,

I added http.jetty (3.0.3.SNAPSHOT) and http.api (3.0.0.SNAPSHOT) to my
runrequirements but now it says it is missing the package org.osgi.dto ?
I tried to add org.osgi.core (6.0.0) but that didn't help.

Do I have to add some other bundles on which http.jetty and http.api are
relying?

Thomas

2015-05-11 19:20 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Am 11.05.15 um 18:51 schrieb Scott Lewis:
> > On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> >> <stuff deleted>
> >> Is there a release scheduled that will include all the http service
> >> changes for R6 final?
> >>
> >> Yes, once there is an official final R6 version, we can do a release.
> >
> > Any schedule around such a release?   I know that the R6 spec is not
> > done/approved/frozen, etc., but I'm just asking what plans exist.
> >
> I assume somewhere in Q3
>
> Carsten
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 11.05.15 um 18:51 schrieb Scott Lewis:
> On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
>> <stuff deleted>
>> Is there a release scheduled that will include all the http service
>> changes for R6 final?
>>
>> Yes, once there is an official final R6 version, we can do a release.
> 
> Any schedule around such a release?   I know that the R6 spec is not
> done/approved/frozen, etc., but I'm just asking what plans exist.
> 
I assume somewhere in Q3

Carsten


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Scott Lewis <sl...@composent.com>.
On 5/11/2015 9:45 AM, Carsten Ziegeler wrote:
> <stuff deleted>
> Is there a release scheduled that will include all the http service
> changes for R6 final?
>
> Yes, once there is an official final R6 version, we can do a release.

Any schedule around such a release?   I know that the R6 spec is not 
done/approved/frozen, etc., but I'm just asking what plans exist.

Scott



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 11.05.15 um 18:25 schrieb Scott Lewis:
> On 5/11/2015 8:53 AM, Carsten Ziegeler wrote:
>> Hi Thomas,
>>
>> the http/whiteboard project is the "old" proprietary whiteboard support
>> from Apache Felix. The new RFC-189 based stuff requires you to compile
>> the api, base and jetty projects and use the api and jetty bundle at
>> runtime.
> 
> Is there a release scheduled that will include all the http service
> changes for R6 final?
> 
Yes, once there is an official final R6 version, we can do a release. We
also need to implement some minor stuff, but that should be finished
before the official version is available

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Scott Lewis <sl...@composent.com>.
On 5/11/2015 8:53 AM, Carsten Ziegeler wrote:
> Hi Thomas,
>
> the http/whiteboard project is the "old" proprietary whiteboard support
> from Apache Felix. The new RFC-189 based stuff requires you to compile
> the api, base and jetty projects and use the api and jetty bundle at
> runtime.

Is there a release scheduled that will include all the http service 
changes for R6 final?

Thanks,

Scott


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Thomas,

the http/whiteboard project is the "old" proprietary whiteboard support
from Apache Felix. The new RFC-189 based stuff requires you to compile
the api, base and jetty projects and use the api and jetty bundle at
runtime.

Carsten

Am 11.05.15 um 17:16 schrieb Thomas Driessen:
> Hi Carsten,
> 
> thanks for the quick response.
> 
> What I've done so far:
> I followed your advice and cloned the felix trunk from this location [1]. I
> then compiled the subproject http/whiteboard via "mvn clean install" and
> added the created jar (org.apache.felix.http.whiteboard.3_0_0_SNAPSHOT.jar)
> to my bnd local repository. I've added the jar to my runrequirements for
> the project I'm currently building and everything was resolved without
> errors.
> I've written a ServletContextListener, which just does some console outputs
> on initialization and destruction. Now i wanted to test this Listener and
> registered it as a Service via the @Component Annotation. (Per default it
> should be registered under the ServletContextListener interface, as I'm
> implementing it).
> 
> My Problem:
> As described in section 5.2.7.2 of the RFC-189, I would have expected to
> see some print outs when starting my project (contains jetty and registers
> some Rest Resources) as the method contextInitialized should be called, but
> nothing happens.
> Am I missing something here? Do I have to add some special properties to
> the service which I maybe overread in the specification?
> 
> Any advice is appreciated :)
> 
> Best regards,
> Thomas
> 
> 
> [1]https://github.com/apache/felix
> 
> 2015-05-09 14:17 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:
> 
>> Hi Thomas,
>>
>> felix trunk contains the new http implementation which implements the
>> new OSGi Http Whiteboard Service implementation. And that one supports
>> the ServletContextListener. I suggest you read up the RFC 189 for that
>> specification; a draft spec from the OSGi alliance will hopefully be
>> available soon.
>>
>> Regards
>> Carsten
>>
>> Am 08.05.15 um 15:29 schrieb Thomas Driessen:
>>> Hi!
>>>
>>> I'm currently trying to integrate Apache Shiro into my OSGi
>>> (Web-)Application which is built upon Apache Felix.
>>> According to the Shiro Setup Tutorial for normal Web Applications I have
>> to
>>> add the following lines in my web.xml:
>>>
>>> <listener>
>>>
>>  <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class></listener>
>>> <filter>
>>>     <filter-name>ShiroFilter</filter-name>
>>>
>>  <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class></filter>
>>>
>>> and some entries for the filter-mapping.
>>>
>>> As I'm working with felix.http and felix.whiteboard I thought, I could
>>> achieve the same result by registering the EnvironmentLoaderListener
>> under
>>> the ServletContextListener Interface and the ShiroFilter under the Filter
>>> Interface via an Activator, like this:
>>>
>>> public class DMActivator extends DependencyActivatorBase {
>>>
>>> @Override
>>> public void destroy(BundleContext arg0, DependencyManager dm) throws
>>> Exception {}
>>>
>>> @Override
>>> public void init(BundleContext arg0, DependencyManager dm) throws
>> Exception
>>> {
>>> dm.add(createComponent()
>>> .setImplementation(EnvironmentLoaderListener.class)
>>> .setInterface(ServletContextListener.class.getName(), null));
>>> dm.add(createComponent()
>>> .setImplementation(ShiroFilter.class)
>>> .setInterface(Filter.class.getName(), null));
>>> }
>>> }
>>>
>>> Unfortunately, the documentation of felix states, that
>>> ServletContextListener are not supported (but should be in the near
>> future)
>>> by felix. Is there any other way I can add shiro to my webapp, that I'm
>> not
>>> aware of? Is the documentation up-to-date or is the
>> ServletContextListener
>>> maybe already added?
>>>
>>> Any advice is appreciated :)
>>>
>>> Thanks in advance for your help.
>>>
>>> Best regards,
>>> Thomas
>>>
>>>
>>
>>
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: ServletContextListener

Posted by Thomas Driessen <th...@ds-lab.org>.
Hi Carsten,

thanks for the quick response.

What I've done so far:
I followed your advice and cloned the felix trunk from this location [1]. I
then compiled the subproject http/whiteboard via "mvn clean install" and
added the created jar (org.apache.felix.http.whiteboard.3_0_0_SNAPSHOT.jar)
to my bnd local repository. I've added the jar to my runrequirements for
the project I'm currently building and everything was resolved without
errors.
I've written a ServletContextListener, which just does some console outputs
on initialization and destruction. Now i wanted to test this Listener and
registered it as a Service via the @Component Annotation. (Per default it
should be registered under the ServletContextListener interface, as I'm
implementing it).

My Problem:
As described in section 5.2.7.2 of the RFC-189, I would have expected to
see some print outs when starting my project (contains jetty and registers
some Rest Resources) as the method contextInitialized should be called, but
nothing happens.
Am I missing something here? Do I have to add some special properties to
the service which I maybe overread in the specification?

Any advice is appreciated :)

Best regards,
Thomas


[1]https://github.com/apache/felix

2015-05-09 14:17 GMT+02:00 Carsten Ziegeler <cz...@apache.org>:

> Hi Thomas,
>
> felix trunk contains the new http implementation which implements the
> new OSGi Http Whiteboard Service implementation. And that one supports
> the ServletContextListener. I suggest you read up the RFC 189 for that
> specification; a draft spec from the OSGi alliance will hopefully be
> available soon.
>
> Regards
> Carsten
>
> Am 08.05.15 um 15:29 schrieb Thomas Driessen:
> > Hi!
> >
> > I'm currently trying to integrate Apache Shiro into my OSGi
> > (Web-)Application which is built upon Apache Felix.
> > According to the Shiro Setup Tutorial for normal Web Applications I have
> to
> > add the following lines in my web.xml:
> >
> > <listener>
> >
>  <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class></listener>
> > <filter>
> >     <filter-name>ShiroFilter</filter-name>
> >
>  <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class></filter>
> >
> > and some entries for the filter-mapping.
> >
> > As I'm working with felix.http and felix.whiteboard I thought, I could
> > achieve the same result by registering the EnvironmentLoaderListener
> under
> > the ServletContextListener Interface and the ShiroFilter under the Filter
> > Interface via an Activator, like this:
> >
> > public class DMActivator extends DependencyActivatorBase {
> >
> > @Override
> > public void destroy(BundleContext arg0, DependencyManager dm) throws
> > Exception {}
> >
> > @Override
> > public void init(BundleContext arg0, DependencyManager dm) throws
> Exception
> > {
> > dm.add(createComponent()
> > .setImplementation(EnvironmentLoaderListener.class)
> > .setInterface(ServletContextListener.class.getName(), null));
> > dm.add(createComponent()
> > .setImplementation(ShiroFilter.class)
> > .setInterface(Filter.class.getName(), null));
> > }
> > }
> >
> > Unfortunately, the documentation of felix states, that
> > ServletContextListener are not supported (but should be in the near
> future)
> > by felix. Is there any other way I can add shiro to my webapp, that I'm
> not
> > aware of? Is the documentation up-to-date or is the
> ServletContextListener
> > maybe already added?
> >
> > Any advice is appreciated :)
> >
> > Thanks in advance for your help.
> >
> > Best regards,
> > Thomas
> >
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>


-- 
M.Sc. Thomas Driessen
Software Methodologies for Distributed Systems
Institute of Computer Science
University of Augsburg
Universitätsstr. 6a
86135 Augsburg, Germany

Tel:    +49 821 598-2486
email: thomas.driessen@informatik.uni-augsburg.de

Re: ServletContextListener

Posted by Carsten Ziegeler <cz...@apache.org>.
Hi Thomas,

felix trunk contains the new http implementation which implements the
new OSGi Http Whiteboard Service implementation. And that one supports
the ServletContextListener. I suggest you read up the RFC 189 for that
specification; a draft spec from the OSGi alliance will hopefully be
available soon.

Regards
Carsten

Am 08.05.15 um 15:29 schrieb Thomas Driessen:
> Hi!
> 
> I'm currently trying to integrate Apache Shiro into my OSGi
> (Web-)Application which is built upon Apache Felix.
> According to the Shiro Setup Tutorial for normal Web Applications I have to
> add the following lines in my web.xml:
> 
> <listener>
>     <listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class></listener>
> <filter>
>     <filter-name>ShiroFilter</filter-name>
>     <filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class></filter>
> 
> and some entries for the filter-mapping.
> 
> As I'm working with felix.http and felix.whiteboard I thought, I could
> achieve the same result by registering the EnvironmentLoaderListener under
> the ServletContextListener Interface and the ShiroFilter under the Filter
> Interface via an Activator, like this:
> 
> public class DMActivator extends DependencyActivatorBase {
> 
> @Override
> public void destroy(BundleContext arg0, DependencyManager dm) throws
> Exception {}
> 
> @Override
> public void init(BundleContext arg0, DependencyManager dm) throws Exception
> {
> dm.add(createComponent()
> .setImplementation(EnvironmentLoaderListener.class)
> .setInterface(ServletContextListener.class.getName(), null));
> dm.add(createComponent()
> .setImplementation(ShiroFilter.class)
> .setInterface(Filter.class.getName(), null));
> }
> }
> 
> Unfortunately, the documentation of felix states, that
> ServletContextListener are not supported (but should be in the near future)
> by felix. Is there any other way I can add shiro to my webapp, that I'm not
> aware of? Is the documentation up-to-date or is the ServletContextListener
> maybe already added?
> 
> Any advice is appreciated :)
> 
> Thanks in advance for your help.
> 
> Best regards,
> Thomas
> 
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org