Hi Achim,

Yes you are right, not an easy one...I understand.

Or, like you proposed, what about providing an API to configure the virtual
hosts? I believe virtual hosts are supported by all the containers pax web
supports, right ? This should be sufficient for my use case.

But like I said, I have a workaround at the moment, so that's cool :-)

Cheers,
Nicolas




On Tue, Sep 12, 2017 at 6:02 PM, 'Achim Nierbeck' via OPS4J <
ops4j@googlegroups.com> wrote:

> Hi Nicolas,
>
> this would require, that we open an API for every supported Container ...
> still thinking about how to handle that :/
> Please open an issue for your new requirements ...
> but don't know how fast people are to actually get to it.
>
> Regards, Achim
>
>
> 2017-09-12 17:56 GMT+02:00 Nicolas Brasey <nicolas.bra...@gmail.com>:
>
>> Hi Achim,
>>
>> Thanks a lot for your answer. Yes I think it would be good to be able to
>> access directly the lower http server for deeper customization. Do you
>> think this would be possible to have it scheduled for the future releases ?
>> Let me know if I should create a new story for that...
>>
>> In the mean time, we will manage our own jetty server in the application
>> directly to serve our angular and react applications which are only static
>> resources apps. And keep the existing karaf jetty server for our backend
>> rest resources.
>>
>> Thanks again!
>>
>> Best regards,
>> Nicolas
>>
>>
>>
>> On Sun, Sep 10, 2017 at 8:20 AM, 'Achim Nierbeck' via OPS4J <
>> ops4j@googlegroups.com> wrote:
>>
>>> Hi Nicolas,
>>>
>>> I fear right now this isn't possible.
>>> As Pax Web doesn't expose a "Jetty service".
>>>
>>> It would need the following changes:
>>> The JettyFactory would also need to listen to Connectors and restart the
>>> jetty instance every time this changes.
>>>
>>> But what you could do:
>>> Configure a bunch of connectors (Virtual Hosts) on Jetty, so they are
>>> available.
>>> Now your webapp-mgmnt application registers each new application with a
>>> new configuration bound to a free instance of your already configured
>>> virtual hosts.
>>>
>>> Take a look at the following sample:
>>> https://github.com/ops4j/org.ops4j.pax.web/blob/master/sampl
>>> es/whiteboard-extended/src/main/java/org/ops4j/pax/web/exten
>>> der/samples/whiteboard/internal/Activator.java
>>>
>>> regards, Achim
>>>
>>>
>>>
>>> 2017-09-07 13:27 GMT+02:00 Nicolas Brasey <nicolas.bra...@gmail.com>:
>>>
>>>> Hi,
>>>>
>>>> With Karaf 4.1.2, I'm trying to programmatically configure Jetty to
>>>> deploy web bundles on different http ports.
>>>>
>>>> For example, I'm trying the achieve the following scenario:
>>>>
>>>> Karaf root instance:
>>>>    admin-web-app on port 8181
>>>>
>>>> Karaf instance 1:
>>>>    my-web-app-1 on port 10081
>>>>
>>>> Karaf instance 2:
>>>>    my-web-app-2 on port 10082
>>>>
>>>> Karaf instance 3:
>>>>    my-web-app-1 on port 10083
>>>>    my-web-app-3 on port 10084
>>>>
>>>>
>>>> But this scenario is also possible:
>>>>
>>>> Karaf root instance:
>>>>    admin-web-app on port 8181
>>>>    my-web-app-1 on port 10081
>>>>    my-web-app-1 on port 10082
>>>>    my-web-app-2 on port 10083
>>>>    my-web-app-3 on port 10084
>>>>
>>>>
>>>> My constraints are that the ports and the context path is not known at
>>>> compile time, it will be dynamically resolved at runtime from a deployment
>>>> configuration file.
>>>>
>>>> What would be the best approach to implement such thing ?
>>>>
>>>> My initial idea would be to have a webapp-mgmnt module who listens on
>>>> new web bundle and deploys it properly using the configuration setting
>>>> (ports, instances).
>>>>
>>>> Some initial questions I have:
>>>>
>>>> 1) How to listen on new bundle that have a give meta information in the
>>>> manifest ?
>>>> 2) How to access the Jetty server from the app code ?
>>>>
>>>> Thanks a lot
>>>> Nicolas
>>>>
>>>> --
>>>> --
>>>> ------------------
>>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "OPS4J" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to ops4j+unsubscr...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> 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
>>>
>>> --
>>> --
>>> ------------------
>>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "OPS4J" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>> pic/ops4j/3Us5goEd9es/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> ops4j+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
>> --
>> ------------------
>> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OPS4J" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to ops4j+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> 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
>
> --
> --
> ------------------
> OPS4J - http://www.ops4j.org - ops4j@googlegroups.com
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "OPS4J" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/ops4j/3Us5goEd9es/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> ops4j+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to