You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Kirys <ki...@neoteroi.org> on 2015/06/01 19:23:52 UTC

Jax-ws and Virtual Hosts

Hi all,
I'm still studing, and i made some test, everything works when deploying 
on the main host, but when deploying on tomcat virtual hosts jax-ws (on 
a EJB) doesn't seem to register the paths.

What I want to achieve:
I would like to use the same app on multiple virtual hosts, each virtual 
host should have different resources (ex different db eccc), but I would 
like the war to be the same for every virtualhost.

Google somehow report info on tomcat every time I search for tomee, this 
is frustrating cause this issue does not apply to tomcat...
Cya
K.

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/03/2015 04:38 PM, Romain Manni-Bucau wrote:
> well I guess it is fixed in 1.7.2. Think to add this system
> property: openejb.deploymentId.format = {host}/{appId}/{ejbJarId}/{ejbName}
good
This week end I'll update the server I use at home to 1.7.2

Thank You
K.

Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
well I guess it is fixed in 1.7.2. Think to add this system
property: openejb.deploymentId.format = {host}/{appId}/{ejbJarId}/{ejbName}


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-03 15:49 GMT+02:00 Kirys <ki...@neoteroi.org>:

> On 06/03/2015 03:31 PM, Romain Manni-Bucau wrote:
>
>> I guess thewar is not in your demo host directory, you can just reuse
>> webapps/ I think
>>
>>
> I've found the solution, and it does reproduce the issue as it is on my
> virtual machine
> You have to set your client to resolve "demohost" as "localhost".
> on my linux box i've added it to /etc/hosts.
> On startup I have an error that does not show on the test virtual machine
> I have at home, but everything else seems the same.
> Let me know.
> K.
>
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/03/2015 03:31 PM, Romain Manni-Bucau wrote:
> I guess thewar is not in your demo host directory, you can just reuse
> webapps/ I think
>

I've found the solution, and it does reproduce the issue as it is on my 
virtual machine
You have to set your client to resolve "demohost" as "localhost".
on my linux box i've added it to /etc/hosts.
On startup I have an error that does not show on the test virtual 
machine I have at home, but everything else seems the same.
Let me know.
K.


Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I guess thewar is not in your demo host directory, you can just reuse
webapps/ I think


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-03 15:23 GMT+02:00 Kirys <ki...@neoteroi.org>:

> On 06/03/2015 08:15 AM, Romain Manni-Bucau wrote:
>
>> 2015-06-02 20:06 GMT+02:00 Kirys <ki...@neoteroi.org>:
>>
>>  [..]-> addChild:  Child name 'localhost' is not unique
>>> I've pushed the experiment to the repo.
>>>
>>>
>>>  you need to add <keepServerXmlAsthis>true</keepServerXmlAsthis>
>> otherwise
>> we replqce the host with the configured one (default in your case) which
>> is
>> localhost for both <Host/>
>>
>
> Got it, now it does start but it does deploy on localhost and not on the
> virtualhost (demohost)
>
>
>> Also saw you were using 1.7.1, maybe switch to 1.7.2:
>> https://issues.apache.org/jira/browse/TOMEE-1449
>>
>>
> I'll do it right after I'll be able to reproduce it on 1.7.1 using tomee
> plugin
>
> Cya
> K.
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/03/2015 08:15 AM, Romain Manni-Bucau wrote:
> 2015-06-02 20:06 GMT+02:00 Kirys <ki...@neoteroi.org>:
>
>> [..]-> addChild:  Child name 'localhost' is not unique
>> I've pushed the experiment to the repo.
>>
>>
> you need to add <keepServerXmlAsthis>true</keepServerXmlAsthis> otherwise
> we replqce the host with the configured one (default in your case) which is
> localhost for both <Host/>

Got it, now it does start but it does deploy on localhost and not on the 
virtualhost (demohost)

>
> Also saw you were using 1.7.1, maybe switch to 1.7.2:
> https://issues.apache.org/jira/browse/TOMEE-1449
>

I'll do it right after I'll be able to reproduce it on 1.7.1 using tomee 
plugin

Cya
K.

Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-06-02 20:06 GMT+02:00 Kirys <ki...@neoteroi.org>:

> On 06/02/2015 06:12 PM, Romain Manni-Bucau wrote:
>
>> I've never used it (netbeans take care of starting tomee for me) I'm
>> trying to understand how to make it deploy to the virtualhost app base.
>>
>>
>> you can create a src/main/tomee/conf and put server.xml inside, then mvn
>> clean package tomee:run will start tomee using it
>>
>> by default it copies apps in webapps, that were i am no more sure what you
>> do then. Using DeployerEjb (netbeans probably does it), you can add
>> openejb.deployer.host property to select the host you want, default is
>> localhost
>>
>
> I've made some attempt but unsuccesfully (lack of knowlegde of the plugin)
> actually it does report
> -> addChild:  Child name 'localhost' is not unique
> I've pushed the experiment to the repo.
>
>
you need to add <keepServerXmlAsthis>true</keepServerXmlAsthis> otherwise
we replqce the host with the configured one (default in your case) which is
localhost for both <Host/>

Also saw you were using 1.7.1, maybe switch to 1.7.2:
https://issues.apache.org/jira/browse/TOMEE-1449


>
>>
>>    PS: maybe activate filtering by default through developping project,
>>> makes
>>>
>>>> it faster to run on our side
>>>>
>>>>  I've set developing as default profile and pushed it to the repo, if
>>> that
>>> was what you were meaning.
>>>
>>>
>>>  sure thks
>>
>>  You are welcome ;)
> Cya
> K.
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/02/2015 06:12 PM, Romain Manni-Bucau wrote:
> I've never used it (netbeans take care of starting tomee for me) I'm
> trying to understand how to make it deploy to the virtualhost app base.
>
>
> you can create a src/main/tomee/conf and put server.xml inside, then mvn
> clean package tomee:run will start tomee using it
>
> by default it copies apps in webapps, that were i am no more sure what you
> do then. Using DeployerEjb (netbeans probably does it), you can add
> openejb.deployer.host property to select the host you want, default is
> localhost

I've made some attempt but unsuccesfully (lack of knowlegde of the 
plugin) actually it does report
-> addChild:  Child name 'localhost' is not unique
I've pushed the experiment to the repo.

>
>
>>   PS: maybe activate filtering by default through developping project, makes
>>> it faster to run on our side
>>>
>> I've set developing as default profile and pushed it to the repo, if that
>> was what you were meaning.
>>
>>
> sure thks
>
You are welcome ;)
Cya
K.

Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2015-06-02 9:06 GMT-07:00 Kirys <ki...@neoteroi.org>:

> On 06/02/2015 04:55 PM, Romain Manni-Bucau wrote:
>
>> Hmm
>>
>> maybe I did it wrong but there isonly JAXRS and not JAXWS services in this
>> project no?
>>
>
> Yes you are right as always, sorry messed up the acronym.
>
>
>> How should we reproduce, we use your server.xml and copy the war in all
>> appBase?
>>
>
> Into the appbase of the virtual host, obviously you also have to setup the
> resolution of the virtual host properly.
>
> I my home network I've this setup:
> local dns that resolve *.network to private ips
> Apache httpd with mod_proxy_ajp that point to the java host machine but
> also using the virtual host directly result in the same issue.
> that server.xml it's exactly the one on my tomee vm (centos 6.5) the
> domain names associated need to be adapted to your network.
> usually I like to have something like "appname.network" so I deploy the
> war into a virtual host with app base properly set to avoid to rename the
> war into ROOT.war ^_^.
>
>  If you can setup  to just let us reproduce using mvn
>> package tomee:run it would help a lot.
>>
>
> I've never used it (netbeans take care of starting tomee for me) I'm
> trying to understand how to make it deploy to the virtualhost app base.
>
>
you can create a src/main/tomee/conf and put server.xml inside, then mvn
clean package tomee:run will start tomee using it

by default it copies apps in webapps, that were i am no more sure what you
do then. Using DeployerEjb (netbeans probably does it), you can add
openejb.deployer.host property to select the host you want, default is
localhost


>  PS: maybe activate filtering by default through developping project, makes
>> it faster to run on our side
>>
>
> I've set developing as default profile and pushed it to the repo, if that
> was what you were meaning.
>
>
sure thks


> Let me know
> Thank You
> K.
>
>
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/02/2015 04:55 PM, Romain Manni-Bucau wrote:
> Hmm
>
> maybe I did it wrong but there isonly JAXRS and not JAXWS services in this
> project no?

Yes you are right as always, sorry messed up the acronym.

>
> How should we reproduce, we use your server.xml and copy the war in all
> appBase?

Into the appbase of the virtual host, obviously you also have to setup 
the resolution of the virtual host properly.

I my home network I've this setup:
local dns that resolve *.network to private ips
Apache httpd with mod_proxy_ajp that point to the java host machine but 
also using the virtual host directly result in the same issue.
that server.xml it's exactly the one on my tomee vm (centos 6.5) the 
domain names associated need to be adapted to your network.
usually I like to have something like "appname.network" so I deploy the 
war into a virtual host with app base properly set to avoid to rename 
the war into ROOT.war ^_^.

> If you can setup  to just let us reproduce using mvn
> package tomee:run it would help a lot.

I've never used it (netbeans take care of starting tomee for me) I'm 
trying to understand how to make it deploy to the virtualhost app base.

> PS: maybe activate filtering by default through developping project, makes
> it faster to run on our side

I've set developing as default profile and pushed it to the repo, if 
that was what you were meaning.

Let me know
Thank You
K.



Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hmm

maybe I did it wrong but there isonly JAXRS and not JAXWS services in this
project no?

How should we reproduce, we use your server.xml and copy the war in all
appBase?

If you can setup tomee-maven-plugin to just let us reproduce using mvn
package tomee:run it would help a lot.

PS: maybe activate filtering by default through developping project, makes
it faster to run on our side




Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-02 11:45 GMT+02:00 Kirys <ki...@neoteroi.org>:

> On 06/01/2015 11:42 PM, Jean-Louis Monteiro wrote:
>
>> It's also fine
>>
>>  Ok
> I've made a demo project, I've taken al the relevant part needed to
> reproduce the issue on my setup (jdk8 tomee 1.7.1).
> this does not use any resource (db eccc) but the rest does not work into
> the virtual host but only into the main host (does not matter if the war is
> in both the directory at the same time or not).
>
> https://bitbucket.org/kirys/tomee-tests
>
> Let me know if you need more info.
> Thank You
> K.
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
On 06/01/2015 11:42 PM, Jean-Louis Monteiro wrote:
> It's also fine
>
Ok
I've made a demo project, I've taken al the relevant part needed to 
reproduce the issue on my setup (jdk8 tomee 1.7.1).
this does not use any resource (db eccc) but the rest does not work into 
the virtual host but only into the main host (does not matter if the war 
is in both the directory at the same time or not).

https://bitbucket.org/kirys/tomee-tests

Let me know if you need more info.
Thank You
K.

Re: Jax-ws and Virtual Hosts

Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
It's also fine

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Mon, Jun 1, 2015 at 11:39 PM, Kirys <ki...@neoteroi.org> wrote:

> for now the setup is the same of the previous time, I have to admit that i
> don't know git (I usually use mercurial), if a repo on bitbucket does
> suffice I'll be happy to make a stub (without all the uneeded stuff ^_^)
> and share on it.
> Cya
> K.
>
>
> On 1 June 2015 at 21:19, Romain Manni-Bucau <rm...@gmail.com> wrote:
>
> > Hi
> >
> > do you care sharing your setup, there are few dark points for me reading
> > your mail. Best can be to setup a small sample on github using tomee
> maven
> > plugin
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-06-01 10:23 GMT-07:00 Kirys <ki...@neoteroi.org>:
> >
> > > Hi all,
> > > I'm still studing, and i made some test, everything works when
> deploying
> > > on the main host, but when deploying on tomcat virtual hosts jax-ws
> (on a
> > > EJB) doesn't seem to register the paths.
> > >
> > > What I want to achieve:
> > > I would like to use the same app on multiple virtual hosts, each
> virtual
> > > host should have different resources (ex different db eccc), but I
> would
> > > like the war to be the same for every virtualhost.
> > >
> > > Google somehow report info on tomcat every time I search for tomee,
> this
> > > is frustrating cause this issue does not apply to tomcat...
> > > Cya
> > > K.
> > >
> >
>

Re: Jax-ws and Virtual Hosts

Posted by Kirys <ki...@neoteroi.org>.
for now the setup is the same of the previous time, I have to admit that i
don't know git (I usually use mercurial), if a repo on bitbucket does
suffice I'll be happy to make a stub (without all the uneeded stuff ^_^)
and share on it.
Cya
K.


On 1 June 2015 at 21:19, Romain Manni-Bucau <rm...@gmail.com> wrote:

> Hi
>
> do you care sharing your setup, there are few dark points for me reading
> your mail. Best can be to setup a small sample on github using tomee maven
> plugin
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-06-01 10:23 GMT-07:00 Kirys <ki...@neoteroi.org>:
>
> > Hi all,
> > I'm still studing, and i made some test, everything works when deploying
> > on the main host, but when deploying on tomcat virtual hosts jax-ws (on a
> > EJB) doesn't seem to register the paths.
> >
> > What I want to achieve:
> > I would like to use the same app on multiple virtual hosts, each virtual
> > host should have different resources (ex different db eccc), but I would
> > like the war to be the same for every virtualhost.
> >
> > Google somehow report info on tomcat every time I search for tomee, this
> > is frustrating cause this issue does not apply to tomcat...
> > Cya
> > K.
> >
>

Re: Jax-ws and Virtual Hosts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

do you care sharing your setup, there are few dark points for me reading
your mail. Best can be to setup a small sample on github using tomee maven
plugin


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-06-01 10:23 GMT-07:00 Kirys <ki...@neoteroi.org>:

> Hi all,
> I'm still studing, and i made some test, everything works when deploying
> on the main host, but when deploying on tomcat virtual hosts jax-ws (on a
> EJB) doesn't seem to register the paths.
>
> What I want to achieve:
> I would like to use the same app on multiple virtual hosts, each virtual
> host should have different resources (ex different db eccc), but I would
> like the war to be the same for every virtualhost.
>
> Google somehow report info on tomcat every time I search for tomee, this
> is frustrating cause this issue does not apply to tomcat...
> Cya
> K.
>