You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by AndreasH <hl...@bbp.ch> on 2006/09/12 14:03:07 UTC

WAR deployment of servicemix-http

Hi

I noticed that on deploying ServiceMix to JBoss using a WAR file, the
servicemix http component is being deployed as a
pojoComponent rather than a binding component. As a result, it does not
accept further deployments. On the other hand, I can 
shutdown the component and redeploy it by putting the installer in the
install directory. Then, it is getting deployed as a binding component.
I am closely following the example in samples/servicemix-web (SVN from
yesterday). As always, any help is greatly appreciated.

Regards

Andreas

-- 
View this message in context: http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
Sent from the ServiceMix - User forum at Nabble.com.


Re: WAR deployment of servicemix-http

Posted by Marrad <ma...@hotmail.com>.
I'm trying to use the HttpComponent and HttpManagedServlet that was fixed in
SM-578, but I get an error when deploying the war:

java.lang.IllegalStateException: ServerManager is not managed
        at
org.apache.servicemix.http.jetty.JettyContextManager.getMainProcessor(JettyContextManager.java:447)

The problem seems to be that the property "manged" is not set to true until
after the context manager is set in HttpLifeCycle doInit().

My configuration in applicationContext.xml is as suggested in a previous
message:

<sm:activationSpec componentName="servicemix-http"
component="#servicemix-http" /> 
...
  <bean id="servicemix-http"
class="org.apache.servicemix.http.HttpComponent" />
  <bean id="lf" factory-bean="servicemix-http" factory-method="getLifeCycle"
/>
  <bean id="config" factory-bean="lf" factory-method="getConfiguration">
    <property name="managed" value="true" />
  </bean> 

Is there another way to configure this?

Regards
Markus


AndreasH wrote:
> 
> I created a Jira for this issue: SM-578.
> I do not have any patches yet but will add as soon as I get anything.
> 
> Regards
> 
> Andreas
> 
> 
> gnodet wrote:
>> 
>> My bad :(
>> Feel free to enhance the HttpManagedServlet and HttpComponent
>> so that it can be configured as managed in an easy way.
>> Adding get/set/Configuration is a real need on the HttpComponent.
>> 
>> Please raise a JIRA and attach any patch you have.
>> 
>> On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>>>
>>>
>>> Hi Guillaume
>>>
>>> Thanks for the tip and sorry that I did not find it myself, despite
>>> checking
>>> the mailing list quite thoroughly.
>>> Anyway, I tried to follow what you mentioned but I am already stuck
>>> again.
>>> I
>>> have the following settings
>>> (slightly changed from your example):
>>>
>>> <sm:activationSpec componentName="servicemix-http"
>>>         component="#servicemix-http" />
>>>
>>> <bean id="servicemix-http"  class="
>>> org.apache.servicemix.http.HttpComponent"
>>> />
>>>   <bean id="lf" factory-bean="servicemix-http"
>>> factory-method="getLifeCycle"
>>> />
>>>   <bean id="config" factory-bean="lf" factory-method="getConfiguration">
>>>     <property name="managed" value="true" />
>>>   </bean>
>>>
>>> However, this is throwing the following exception:
>>> java.lang.IllegalStateException: The component is not an instance of
>>> HttpSpringComponent
>>>         at
>>> org.apache.servicemix.http.HttpManagedServlet.init(HttpManagedServlet.java
>>> :74)
>>>         at
>>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
>>> :1091)
>>>         at org.apache.catalina.core.StandardWrapper.load(
>>> StandardWrapper.java:925)
>>>         at
>>> org.apache.catalina.core.StandardContext.loadOnStartup(
>>> StandardContext.java:3857)
>>> etc.
>>>
>>> It appears that having a managed servlet and a component that can be
>>> deployed to is mutually exclusive at the moment.
>>> Do you think it should be possible to merge the functionality of
>>> HttpSpringComponent and HttpComponent?
>>> If so I would try to do it, on the other hand, if I am on to something
>>> completely wrong I wouldn't want to waste my time.
>>>
>>> Regards
>>>
>>> Andreas
>>>
>>>
>>> gnodet wrote:
>>> >
>>> > See
>>> >
>>> http://www.nabble.com/Http-endpoints-and-the-managed-attribute-tf2197708.html#a6083546
>>> >
>>> > On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>>> >>
>>> >>
>>> >> Hi
>>> >>
>>> >> I noticed that on deploying ServiceMix to JBoss using a WAR file, the
>>> >> servicemix http component is being deployed as a
>>> >> pojoComponent rather than a binding component. As a result, it does
>>> not
>>> >> accept further deployments. On the other hand, I can
>>> >> shutdown the component and redeploy it by putting the installer in
>>> the
>>> >> install directory. Then, it is getting deployed as a binding
>>> component.
>>> >> I am closely following the example in samples/servicemix-web (SVN
>>> from
>>> >> yesterday). As always, any help is greatly appreciated.
>>> >>
>>> >> Regards
>>> >>
>>> >> Andreas
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
>>> >> Sent from the ServiceMix - User forum at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Cheers,
>>> > Guillaume Nodet
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6265559
>>> Sent from the ServiceMix - User forum at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Guillaume Nodet
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6719460
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: WAR deployment of servicemix-http

Posted by AndreasH <hl...@bbp.ch>.
I created a Jira for this issue: SM-578.
I do not have any patches yet but will add as soon as I get anything.

Regards

Andreas


gnodet wrote:
> 
> My bad :(
> Feel free to enhance the HttpManagedServlet and HttpComponent
> so that it can be configured as managed in an easy way.
> Adding get/set/Configuration is a real need on the HttpComponent.
> 
> Please raise a JIRA and attach any patch you have.
> 
> On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>>
>>
>> Hi Guillaume
>>
>> Thanks for the tip and sorry that I did not find it myself, despite
>> checking
>> the mailing list quite thoroughly.
>> Anyway, I tried to follow what you mentioned but I am already stuck
>> again.
>> I
>> have the following settings
>> (slightly changed from your example):
>>
>> <sm:activationSpec componentName="servicemix-http"
>>         component="#servicemix-http" />
>>
>> <bean id="servicemix-http"  class="
>> org.apache.servicemix.http.HttpComponent"
>> />
>>   <bean id="lf" factory-bean="servicemix-http"
>> factory-method="getLifeCycle"
>> />
>>   <bean id="config" factory-bean="lf" factory-method="getConfiguration">
>>     <property name="managed" value="true" />
>>   </bean>
>>
>> However, this is throwing the following exception:
>> java.lang.IllegalStateException: The component is not an instance of
>> HttpSpringComponent
>>         at
>> org.apache.servicemix.http.HttpManagedServlet.init(HttpManagedServlet.java
>> :74)
>>         at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
>> :1091)
>>         at org.apache.catalina.core.StandardWrapper.load(
>> StandardWrapper.java:925)
>>         at
>> org.apache.catalina.core.StandardContext.loadOnStartup(
>> StandardContext.java:3857)
>> etc.
>>
>> It appears that having a managed servlet and a component that can be
>> deployed to is mutually exclusive at the moment.
>> Do you think it should be possible to merge the functionality of
>> HttpSpringComponent and HttpComponent?
>> If so I would try to do it, on the other hand, if I am on to something
>> completely wrong I wouldn't want to waste my time.
>>
>> Regards
>>
>> Andreas
>>
>>
>> gnodet wrote:
>> >
>> > See
>> >
>> http://www.nabble.com/Http-endpoints-and-the-managed-attribute-tf2197708.html#a6083546
>> >
>> > On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>> >>
>> >>
>> >> Hi
>> >>
>> >> I noticed that on deploying ServiceMix to JBoss using a WAR file, the
>> >> servicemix http component is being deployed as a
>> >> pojoComponent rather than a binding component. As a result, it does
>> not
>> >> accept further deployments. On the other hand, I can
>> >> shutdown the component and redeploy it by putting the installer in the
>> >> install directory. Then, it is getting deployed as a binding
>> component.
>> >> I am closely following the example in samples/servicemix-web (SVN from
>> >> yesterday). As always, any help is greatly appreciated.
>> >>
>> >> Regards
>> >>
>> >> Andreas
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
>> >> Sent from the ServiceMix - User forum at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6265559
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6300096
Sent from the ServiceMix - User forum at Nabble.com.


Re: WAR deployment of servicemix-http

Posted by Guillaume Nodet <gn...@gmail.com>.
My bad :(
Feel free to enhance the HttpManagedServlet and HttpComponent
so that it can be configured as managed in an easy way.
Adding get/set/Configuration is a real need on the HttpComponent.

Please raise a JIRA and attach any patch you have.

On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>
>
> Hi Guillaume
>
> Thanks for the tip and sorry that I did not find it myself, despite
> checking
> the mailing list quite thoroughly.
> Anyway, I tried to follow what you mentioned but I am already stuck again.
> I
> have the following settings
> (slightly changed from your example):
>
> <sm:activationSpec componentName="servicemix-http"
>         component="#servicemix-http" />
>
> <bean id="servicemix-http"  class="
> org.apache.servicemix.http.HttpComponent"
> />
>   <bean id="lf" factory-bean="servicemix-http"
> factory-method="getLifeCycle"
> />
>   <bean id="config" factory-bean="lf" factory-method="getConfiguration">
>     <property name="managed" value="true" />
>   </bean>
>
> However, this is throwing the following exception:
> java.lang.IllegalStateException: The component is not an instance of
> HttpSpringComponent
>         at
> org.apache.servicemix.http.HttpManagedServlet.init(HttpManagedServlet.java
> :74)
>         at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java
> :1091)
>         at org.apache.catalina.core.StandardWrapper.load(
> StandardWrapper.java:925)
>         at
> org.apache.catalina.core.StandardContext.loadOnStartup(
> StandardContext.java:3857)
> etc.
>
> It appears that having a managed servlet and a component that can be
> deployed to is mutually exclusive at the moment.
> Do you think it should be possible to merge the functionality of
> HttpSpringComponent and HttpComponent?
> If so I would try to do it, on the other hand, if I am on to something
> completely wrong I wouldn't want to waste my time.
>
> Regards
>
> Andreas
>
>
> gnodet wrote:
> >
> > See
> >
> http://www.nabble.com/Http-endpoints-and-the-managed-attribute-tf2197708.html#a6083546
> >
> > On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
> >>
> >>
> >> Hi
> >>
> >> I noticed that on deploying ServiceMix to JBoss using a WAR file, the
> >> servicemix http component is being deployed as a
> >> pojoComponent rather than a binding component. As a result, it does not
> >> accept further deployments. On the other hand, I can
> >> shutdown the component and redeploy it by putting the installer in the
> >> install directory. Then, it is getting deployed as a binding component.
> >> I am closely following the example in samples/servicemix-web (SVN from
> >> yesterday). As always, any help is greatly appreciated.
> >>
> >> Regards
> >>
> >> Andreas
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
> >> Sent from the ServiceMix - User forum at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6265559
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: WAR deployment of servicemix-http

Posted by AndreasH <hl...@bbp.ch>.
Hi Guillaume

Thanks for the tip and sorry that I did not find it myself, despite checking
the mailing list quite thoroughly.
Anyway, I tried to follow what you mentioned but I am already stuck again. I
have the following settings 
(slightly changed from your example):

<sm:activationSpec componentName="servicemix-http"
	component="#servicemix-http" />

<bean id="servicemix-http"  class="org.apache.servicemix.http.HttpComponent"
/>
  <bean id="lf" factory-bean="servicemix-http" factory-method="getLifeCycle"
/>
  <bean id="config" factory-bean="lf" factory-method="getConfiguration">
    <property name="managed" value="true" />
  </bean>

However, this is throwing the following exception:
java.lang.IllegalStateException: The component is not an instance of
HttpSpringComponent
	at
org.apache.servicemix.http.HttpManagedServlet.init(HttpManagedServlet.java:74)
	at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
	at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
etc.

It appears that having a managed servlet and a component that can be
deployed to is mutually exclusive at the moment.
Do you think it should be possible to merge the functionality of
HttpSpringComponent and HttpComponent?
If so I would try to do it, on the other hand, if I am on to something
completely wrong I wouldn't want to waste my time.

Regards

Andreas


gnodet wrote:
> 
> See
> http://www.nabble.com/Http-endpoints-and-the-managed-attribute-tf2197708.html#a6083546
> 
> On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>>
>>
>> Hi
>>
>> I noticed that on deploying ServiceMix to JBoss using a WAR file, the
>> servicemix http component is being deployed as a
>> pojoComponent rather than a binding component. As a result, it does not
>> accept further deployments. On the other hand, I can
>> shutdown the component and redeploy it by putting the installer in the
>> install directory. Then, it is getting deployed as a binding component.
>> I am closely following the example in samples/servicemix-web (SVN from
>> yesterday). As always, any help is greatly appreciated.
>>
>> Regards
>>
>> Andreas
>>
>> --
>> View this message in context:
>> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6265559
Sent from the ServiceMix - User forum at Nabble.com.


Re: WAR deployment of servicemix-http

Posted by Guillaume Nodet <gn...@gmail.com>.
See
http://www.nabble.com/Http-endpoints-and-the-managed-attribute-tf2197708.html#a6083546

On 9/12/06, AndreasH <hl...@bbp.ch> wrote:
>
>
> Hi
>
> I noticed that on deploying ServiceMix to JBoss using a WAR file, the
> servicemix http component is being deployed as a
> pojoComponent rather than a binding component. As a result, it does not
> accept further deployments. On the other hand, I can
> shutdown the component and redeploy it by putting the installer in the
> install directory. Then, it is getting deployed as a binding component.
> I am closely following the example in samples/servicemix-web (SVN from
> yesterday). As always, any help is greatly appreciated.
>
> Regards
>
> Andreas
>
> --
> View this message in context:
> http://www.nabble.com/WAR-deployment-of-servicemix-http-tf2258443.html#a6264644
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet