You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by Sahoo <Sa...@Sun.COM> on 2010/03/30 02:51:50 UTC

web console and multiple HTTP Service

Should not there be a way to select an HTTP Service among multiple ones? 
In environment supporting multiple "virtual servers [1]," an HTTPService 
maps to a virtual server. In such an environment, this feature will be 
useful. We can actually take a filter criteria as a configuration. Any 
comments?

Thanks,
Sahoo

[1] http://www.ex-parrot.com/pete/tomcat-vhost.html

Re: web console and multiple HTTP Service

Posted by Sahoo <sa...@sun.com>.
I think there should be a configuration option to select the http 
services. The default value can be "all."

Thanks,
Sahoo

Guillaume Nodet wrote:
> We need to make sure that the servlets (web console) is using the same
> servlet api than the http service at least.
> But yeah, it could register on all compatible http services.
>
> On Tue, Mar 30, 2010 at 02:51, Sahoo <Sa...@sun.com> wrote:
>
>   
>> Should not there be a way to select an HTTP Service among multiple ones? In
>> environment supporting multiple "virtual servers [1]," an HTTPService maps
>> to a virtual server. In such an environment, this feature will be useful. We
>> can actually take a filter criteria as a configuration. Any comments?
>>
>> Thanks,
>> Sahoo
>>
>> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>>
>>     
>
>
>
>   

Re: web console and multiple HTTP Service

Posted by Guillaume Nodet <gn...@gmail.com>.
We need to make sure that the servlets (web console) is using the same
servlet api than the http service at least.
But yeah, it could register on all compatible http services.

On Tue, Mar 30, 2010 at 02:51, Sahoo <Sa...@sun.com> wrote:

> Should not there be a way to select an HTTP Service among multiple ones? In
> environment supporting multiple "virtual servers [1]," an HTTPService maps
> to a virtual server. In such an environment, this feature will be useful. We
> can actually take a filter criteria as a configuration. Any comments?
>
> Thanks,
> Sahoo
>
> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Re: web console and multiple HTTP Service

Posted by Felix Meschberger <fm...@gmail.com>.
Can you create an issue for that ? Thanks alot.

Regards
Felix

On 30.03.2010 08:42, Sahoo wrote:
> Felix Meschberger wrote:
>> Hi,
>>
>> On 30.03.2010 02:51, Sahoo wrote:
>>  
>>> Should not there be a way to select an HTTP Service among multiple ones?
>>> In environment supporting multiple "virtual servers [1]," an HTTPService
>>> maps to a virtual server. In such an environment, this feature will be
>>> useful. We can actually take a filter criteria as a configuration. Any
>>> comments?
>>>     
>>
>> To be honest, we never had the requirement and thus we just register
>> with whatever HTTP Service is provided by the framework.
>>
>> If there are multiple services active in the framework, I could imagine
>> it would make sense to be able to bind to more than just a (more or
>> less) randomly selected one.
>>
>> How about this: There is a configuration option allowing to specify a
>> service selection filter (used as the filter argument to the
>> BundleContext.getServiceReferences(String clazz, String filter)
>> method). If this property is not set, the console binds to all HTTP
>> Services available. Otherwise it binds to only the services matching the
>> filter - actually not binding at all if there is no matching Service.
>>
>> WDYT ?
>>   
> Perfect. That's exactly what I asked for.
> 
> BTW, it is a real requirement for us who use web console in GlassFish.
> We have a separate virtual server which is used for administration
> purpose and I would like to deploy web console there.
> 
> Thank you,
> Sahoo
>> Regards
>> Felix
>>
>>  
>>> Thanks,
>>> Sahoo
>>>
>>> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>>>
>>>     
> 

Re: web console and multiple HTTP Service

Posted by Sahoo <Sa...@Sun.COM>.
Felix Meschberger wrote:
> Hi,
>
> On 30.03.2010 02:51, Sahoo wrote:
>   
>> Should not there be a way to select an HTTP Service among multiple ones?
>> In environment supporting multiple "virtual servers [1]," an HTTPService
>> maps to a virtual server. In such an environment, this feature will be
>> useful. We can actually take a filter criteria as a configuration. Any
>> comments?
>>     
>
> To be honest, we never had the requirement and thus we just register
> with whatever HTTP Service is provided by the framework.
>
> If there are multiple services active in the framework, I could imagine
> it would make sense to be able to bind to more than just a (more or
> less) randomly selected one.
>
> How about this: There is a configuration option allowing to specify a
> service selection filter (used as the filter argument to the
> BundleContext.getServiceReferences(String clazz, String filter)
> method). If this property is not set, the console binds to all HTTP
> Services available. Otherwise it binds to only the services matching the
> filter - actually not binding at all if there is no matching Service.
>
> WDYT ?
>   
Perfect. That's exactly what I asked for.

BTW, it is a real requirement for us who use web console in GlassFish. 
We have a separate virtual server which is used for administration 
purpose and I would like to deploy web console there.

Thank you,
Sahoo
> Regards
> Felix
>
>   
>> Thanks,
>> Sahoo
>>
>> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>>
>>     

Re: web console and multiple HTTP Service

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

On 30.03.2010 02:51, Sahoo wrote:
> Should not there be a way to select an HTTP Service among multiple ones?
> In environment supporting multiple "virtual servers [1]," an HTTPService
> maps to a virtual server. In such an environment, this feature will be
> useful. We can actually take a filter criteria as a configuration. Any
> comments?

To be honest, we never had the requirement and thus we just register
with whatever HTTP Service is provided by the framework.

If there are multiple services active in the framework, I could imagine
it would make sense to be able to bind to more than just a (more or
less) randomly selected one.

How about this: There is a configuration option allowing to specify a
service selection filter (used as the filter argument to the
BundleContext.getServiceReferences(String clazz, String filter)
method). If this property is not set, the console binds to all HTTP
Services available. Otherwise it binds to only the services matching the
filter - actually not binding at all if there is no matching Service.

WDYT ?

Regards
Felix

> 
> Thanks,
> Sahoo
> 
> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
> 

Re: web console and multiple HTTP Service

Posted by Justin Edelson <ju...@gmail.com>.
On Mar 30, 2010, at 2:04 AM, Sahoo <Sa...@Sun.COM> wrote:

> Looking at the code, I see WebConsole gets bound to whichever
> HttpService it encounters first.
>
> Virtual Hosts are used by many and is supported in many containers,
> e.g, Tomcat, GlassFish, etc.

Right, but in order for what you are describing to be an issue, it
means that all vhosts are sharing a single OSGi framework. This is the
pattern I was asking about. At minimum, it seems like you should be
using nested frameworks or something like dmServer/Virgo's notion of
regions.

Justin
>
> Thanks,
> Sahoo
>
> Justin Edelson wrote:
>> Actually, I would expect web console to register itself with ALL
>> HttpService services, but I don't know if that's the current
>> behavior.
>>
>> That said, using multiple HttpServices for virtual hosting seems like
>> a bad idea to me (then again, vhosts at the app tier in general seems
>> like a bad idea to me). Out of curiosity, is this actually done?
>>
>> Justin
>>
>> On Mar 29, 2010, at 8:51 PM, Sahoo <Sa...@Sun.COM> wrote:
>>
>>
>>> Should not there be a way to select an HTTP Service among multiple
>>> ones? In environment supporting multiple "virtual servers [1]," an
>>> HTTPService maps to a virtual server. In such an environment, this
>>> feature will be useful. We can actually take a filter criteria as a
>>> configuration. Any comments?
>>>
>>> Thanks,
>>> Sahoo
>>>
>>> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>>>

Re: web console and multiple HTTP Service

Posted by Sahoo <Sa...@Sun.COM>.
Looking at the code, I see WebConsole gets bound to whichever 
HttpService it encounters first.

Virtual Hosts are used by many and is supported in many containers, e.g, 
Tomcat, GlassFish, etc.

Thanks,
Sahoo

Justin Edelson wrote:
> Actually, I would expect web console to register itself with ALL
> HttpService services, but I don't know if that's the current behavior.
>
> That said, using multiple HttpServices for virtual hosting seems like
> a bad idea to me (then again, vhosts at the app tier in general seems
> like a bad idea to me). Out of curiosity, is this actually done?
>
> Justin
>
> On Mar 29, 2010, at 8:51 PM, Sahoo <Sa...@Sun.COM> wrote:
>
>   
>> Should not there be a way to select an HTTP Service among multiple
>> ones? In environment supporting multiple "virtual servers [1]," an
>> HTTPService maps to a virtual server. In such an environment, this
>> feature will be useful. We can actually take a filter criteria as a
>> configuration. Any comments?
>>
>> Thanks,
>> Sahoo
>>
>> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html
>>     

Re: web console and multiple HTTP Service

Posted by Justin Edelson <ju...@gmail.com>.
Actually, I would expect web console to register itself with ALL
HttpService services, but I don't know if that's the current behavior.

That said, using multiple HttpServices for virtual hosting seems like
a bad idea to me (then again, vhosts at the app tier in general seems
like a bad idea to me). Out of curiosity, is this actually done?

Justin

On Mar 29, 2010, at 8:51 PM, Sahoo <Sa...@Sun.COM> wrote:

> Should not there be a way to select an HTTP Service among multiple
> ones? In environment supporting multiple "virtual servers [1]," an
> HTTPService maps to a virtual server. In such an environment, this
> feature will be useful. We can actually take a filter criteria as a
> configuration. Any comments?
>
> Thanks,
> Sahoo
>
> [1] http://www.ex-parrot.com/pete/tomcat-vhost.html