You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <bi...@gmail.com> on 2008/04/10 04:15:15 UTC

Local transport is both up and down at the same time, sort of.

Webapp #1 sets up a service, with an endpoint on the local transport.

      [java] INFO: Creating Service {urn:basistech.com:rta}RosetteTextAnalyzer
from class com.basistech.rta.ws.RosetteTextAnalyzer
     [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
initDestination
     [java] INFO: Setting the server's publish address to be
local://RosetteTextAnalyzer

Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
Unhappiness results. First, some diagnostic complaints from the RSFB while
creating the proxy (this is all JAXWS+JAXB) then we get the complaint that
no-one and nothing is listening. Will the local transport in fact work
across webapps? For that matter, are the complaints because all I've given
the proxy factory to work on is an interface, and it doesn't have param
names? I've been working inside CXF for so long that I'm pretty lost when I
just try to use it.

  [java] Apr 9, 2008 9:11:34 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
     [java] INFO: Creating Service
{urn:basistech.com:rta}RosetteTextAnalyzerService
from class com.basistech.rta.RosetteTextAnalyzer
     [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
     [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type QName
null.
     [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
     [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
     [java] {urn:basistech.com:rta:v1.0}glossaries part type QName null.
     [java]
     [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.transport.local.LocalTransportFactory createDestination
     [java] INFO: Creating destination for address
local://RosetteTextAnalyzer
     [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
     [java] INFO: Interceptor has thrown exception, unwinding now
     [java] java.lang.IllegalStateException: Local destination does not have
a MessageObserver on address local://RosetteTextAnalyzer

Re: Local transport is both up and down at the same time, sort of.

Posted by Daniel Kulp <dk...@apache.org>.
On Thursday 10 April 2008, Benson Margulies wrote:
> Willem,
>
> The log messages from RSFB are a bit confusing. Notice that the first
> set ends with a publish address and the second with a destination
> address.
>
> I'll go read the code, but now that I'm awake I can't imagine how the
> local transport would sneak across webapp class loader boundaries if
> no code is loaded into the system class loader.

Yea.  That probably won't work.   More over, I think the two need to 
share the same bus which makes it even harder to setup in different 
classloaders.

Dan


>
> --benson
>
>
> On Thu, Apr 10, 2008 at 7:34 AM, Benson Margulies
> <bi...@gmail.com>
>
> wrote:
> > I see your point. Maybe I made a cut-and-paste error and set up the
> > service factory instead of the proxy factory.
> >
> >
> > On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang
> > <wi...@gmail.com>
> >
> > wrote:
> > > Hi Benson,
> > >
> > > I am confused about the Webapp#2's log.
> > >
> > >    [java] Apr 9, 2008 9:11:35 PM
> > > org.apache.cxf.transport.local.LocalTransportFactory
> > > createDestination [java] INFO: Creating destination for address
> > > local://RosetteTextAnalyzer
> > >
> > > It looks you create the same local transport destination in
> > > Webapp#2.
> > >
> > > AFAIK , if your two application are in the same JVM , the local
> > > transport should work :)
> > >
> > >
> > > Willem
> > >
> > > Benson Margulies wrote:
> > > > Webapp #1 sets up a service, with an endpoint on the local
> > > > transport.
> > > >
> > > >      [java] INFO: Creating Service {urn:basistech.com:
> > > > rta}RosetteTextAnalyzer
> > > > from class com.basistech.rta.ws.RosetteTextAnalyzer
> > > >     [java] Apr 9, 2008 9:10:55 PM
> > > > org.apache.cxf.endpoint.ServerImpl initDestination
> > > >     [java] INFO: Setting the server's publish address to be
> > > > local://RosetteTextAnalyzer
> > > >
> > > > Webapp #2 sets up a client proxy, trying to talk to the same
> > > > endpoint. Unhappiness results. First, some diagnostic complaints
> > > > from the RSFB while
> > > > creating the proxy (this is all JAXWS+JAXB) then we get the
> > > > complaint that
> > > > no-one and nothing is listening. Will the local transport in
> > > > fact work across webapps? For that matter, are the complaints
> > > > because all I've given
> > > > the proxy factory to work on is an interface, and it doesn't
> > > > have param
> > > > names? I've been working inside CXF for so long that I'm pretty
> > > > lost when I
> > > > just try to use it.
> > > >
> > > >  [java] Apr 9, 2008 9:11:34 PM
> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > > buildServiceFromClass
> > > >     [java] INFO: Creating Service
> > > > {urn:basistech.com:rta}RosetteTextAnalyzerService
> > > > from class com.basistech.rta.RosetteTextAnalyzer
> > > >     [java] Apr 9, 2008 9:11:35 PM
> > > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > > buildServiceFromClass
> > > >     [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part
> > > > type QName
> > > > null.
> > > >     [java] {urn:basistech.com:rta:v1.0}languages part type QName
> > > > null. [java] {urn:basistech.com:rta:v1.0}matches part type QName
> > > > null. [java] {urn:basistech.com:rta:v1.0}glossaries part type
> > > > QName null.
> > > >     [java]
> > > >     [java] Apr 9, 2008 9:11:35 PM
> > > > org.apache.cxf.transport.local.LocalTransportFactory
> > > > createDestination [java] INFO: Creating destination for address
> > > > local://RosetteTextAnalyzer
> > > >     [java] Apr 9, 2008 9:11:35 PM
> > > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> > > >     [java] INFO: Interceptor has thrown exception, unwinding now
> > > >     [java] java.lang.IllegalStateException: Local destination
> > > > does not have
> > > > a MessageObserver on address local://RosetteTextAnalyzer



-- 
J. Daniel Kulp
Principal Engineer, IONA
dkulp@apache.org
http://www.dankulp.com/blog

Re: Local transport is both up and down at the same time, sort of.

Posted by Benson Margulies <bi...@gmail.com>.
To share a bus, I'd have to get CXF in as a global resource across webapps.

That's non-portable between containers, each does it differently.

So I think I'll stick with TCP between webapps!

Re: Local transport is both up and down at the same time, sort of.

Posted by Willem Jiang <wi...@gmail.com>.
Just as DanK said , if you want to use the local transport across the 
web apps, you need to share the bus between these apps.
It is not a easy way to do that.
How about starting a stand http servlet transport to do that ?

Willem

Benson Margulies wrote:
> JNI is a pain in a web container. It occured to me that the most portable
> way to share JNI between webapps was to put it into a web service in one web
> app, and consume it in the others.
>
>   


Re: Local transport is both up and down at the same time, sort of.

Posted by Benson Margulies <bi...@gmail.com>.
JNI is a pain in a web container. It occured to me that the most portable
way to share JNI between webapps was to put it into a web service in one web
app, and consume it in the others.

Re: Local transport is both up and down at the same time, sort of.

Posted by Willem Jiang <wi...@gmail.com>.
Hi Benson

Just one more question, why did you want to use location transport in 
the Web container ?
Did you want to share or route the client request between the different 
endpoints?

Willem

Benson Margulies wrote:
> Willem,
>
> The log messages from RSFB are a bit confusing. Notice that the first set
> ends with a publish address and the second with a destination address.
>
> I'll go read the code, but now that I'm awake I can't imagine how the local
> transport would sneak across webapp class loader boundaries if no code is
> loaded into the system class loader.
>
> --benson
>
>
> On Thu, Apr 10, 2008 at 7:34 AM, Benson Margulies <bi...@gmail.com>
> wrote:
>
>   
>> I see your point. Maybe I made a cut-and-paste error and set up the
>> service factory instead of the proxy factory.
>>
>>
>> On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang <wi...@gmail.com>
>> wrote:
>>
>>     
>>> Hi Benson,
>>>
>>> I am confused about the Webapp#2's log.
>>>
>>>    [java] Apr 9, 2008 9:11:35 PM
>>> org.apache.cxf.transport.local.LocalTransportFactory createDestination
>>>    [java] INFO: Creating destination for address
>>> local://RosetteTextAnalyzer
>>>
>>> It looks you create the same local transport destination in Webapp#2.
>>>
>>> AFAIK , if your two application are in the same JVM , the local
>>> transport should work :)
>>>
>>>
>>> Willem
>>>
>>>
>>>
>>>
>>> Benson Margulies wrote:
>>>
>>>       
>>>> Webapp #1 sets up a service, with an endpoint on the local transport.
>>>>
>>>>      [java] INFO: Creating Service {urn:basistech.com:
>>>> rta}RosetteTextAnalyzer
>>>> from class com.basistech.rta.ws.RosetteTextAnalyzer
>>>>     [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
>>>> initDestination
>>>>     [java] INFO: Setting the server's publish address to be
>>>> local://RosetteTextAnalyzer
>>>>
>>>> Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
>>>> Unhappiness results. First, some diagnostic complaints from the RSFB
>>>> while
>>>> creating the proxy (this is all JAXWS+JAXB) then we get the complaint
>>>> that
>>>> no-one and nothing is listening. Will the local transport in fact work
>>>> across webapps? For that matter, are the complaints because all I've
>>>> given
>>>> the proxy factory to work on is an interface, and it doesn't have
>>>> param
>>>> names? I've been working inside CXF for so long that I'm pretty lost
>>>> when I
>>>> just try to use it.
>>>>
>>>>  [java] Apr 9, 2008 9:11:34 PM
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>>>> buildServiceFromClass
>>>>     [java] INFO: Creating Service
>>>> {urn:basistech.com:rta}RosetteTextAnalyzerService
>>>> from class com.basistech.rta.RosetteTextAnalyzer
>>>>     [java] Apr 9, 2008 9:11:35 PM
>>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>>>> buildServiceFromClass
>>>>     [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type
>>>> QName
>>>> null.
>>>>     [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
>>>>     [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
>>>>     [java] {urn:basistech.com:rta:v1.0}glossaries part type QName
>>>> null.
>>>>     [java]
>>>>     [java] Apr 9, 2008 9:11:35 PM
>>>> org.apache.cxf.transport.local.LocalTransportFactory createDestination
>>>>     [java] INFO: Creating destination for address
>>>> local://RosetteTextAnalyzer
>>>>     [java] Apr 9, 2008 9:11:35 PM
>>>> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
>>>>     [java] INFO: Interceptor has thrown exception, unwinding now
>>>>     [java] java.lang.IllegalStateException: Local destination does not
>>>> have
>>>> a MessageObserver on address local://RosetteTextAnalyzer
>>>>
>>>>
>>>>
>>>>         
>>>       
>
>   


Re: Local transport is both up and down at the same time, sort of.

Posted by Benson Margulies <bi...@gmail.com>.
Willem,

The log messages from RSFB are a bit confusing. Notice that the first set
ends with a publish address and the second with a destination address.

I'll go read the code, but now that I'm awake I can't imagine how the local
transport would sneak across webapp class loader boundaries if no code is
loaded into the system class loader.

--benson


On Thu, Apr 10, 2008 at 7:34 AM, Benson Margulies <bi...@gmail.com>
wrote:

> I see your point. Maybe I made a cut-and-paste error and set up the
> service factory instead of the proxy factory.
>
>
> On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang <wi...@gmail.com>
> wrote:
>
> > Hi Benson,
> >
> > I am confused about the Webapp#2's log.
> >
> >    [java] Apr 9, 2008 9:11:35 PM
> > org.apache.cxf.transport.local.LocalTransportFactory createDestination
> >    [java] INFO: Creating destination for address
> > local://RosetteTextAnalyzer
> >
> > It looks you create the same local transport destination in Webapp#2.
> >
> > AFAIK , if your two application are in the same JVM , the local
> > transport should work :)
> >
> >
> > Willem
> >
> >
> >
> >
> > Benson Margulies wrote:
> >
> > > Webapp #1 sets up a service, with an endpoint on the local transport.
> > >
> > >      [java] INFO: Creating Service {urn:basistech.com:
> > > rta}RosetteTextAnalyzer
> > > from class com.basistech.rta.ws.RosetteTextAnalyzer
> > >     [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
> > > initDestination
> > >     [java] INFO: Setting the server's publish address to be
> > > local://RosetteTextAnalyzer
> > >
> > > Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
> > > Unhappiness results. First, some diagnostic complaints from the RSFB
> > > while
> > > creating the proxy (this is all JAXWS+JAXB) then we get the complaint
> > > that
> > > no-one and nothing is listening. Will the local transport in fact work
> > > across webapps? For that matter, are the complaints because all I've
> > > given
> > > the proxy factory to work on is an interface, and it doesn't have
> > > param
> > > names? I've been working inside CXF for so long that I'm pretty lost
> > > when I
> > > just try to use it.
> > >
> > >  [java] Apr 9, 2008 9:11:34 PM
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > buildServiceFromClass
> > >     [java] INFO: Creating Service
> > > {urn:basistech.com:rta}RosetteTextAnalyzerService
> > > from class com.basistech.rta.RosetteTextAnalyzer
> > >     [java] Apr 9, 2008 9:11:35 PM
> > > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > > buildServiceFromClass
> > >     [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type
> > > QName
> > > null.
> > >     [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
> > >     [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
> > >     [java] {urn:basistech.com:rta:v1.0}glossaries part type QName
> > > null.
> > >     [java]
> > >     [java] Apr 9, 2008 9:11:35 PM
> > > org.apache.cxf.transport.local.LocalTransportFactory createDestination
> > >     [java] INFO: Creating destination for address
> > > local://RosetteTextAnalyzer
> > >     [java] Apr 9, 2008 9:11:35 PM
> > > org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> > >     [java] INFO: Interceptor has thrown exception, unwinding now
> > >     [java] java.lang.IllegalStateException: Local destination does not
> > > have
> > > a MessageObserver on address local://RosetteTextAnalyzer
> > >
> > >
> > >
> >
> >
>

Re: Local transport is both up and down at the same time, sort of.

Posted by Benson Margulies <bi...@gmail.com>.
I see your point. Maybe I made a cut-and-paste error and set up the service
factory instead of the proxy factory.

On Thu, Apr 10, 2008 at 4:14 AM, Willem Jiang <wi...@gmail.com>
wrote:

> Hi Benson,
>
> I am confused about the Webapp#2's log.
>
>    [java] Apr 9, 2008 9:11:35 PM
> org.apache.cxf.transport.local.LocalTransportFactory createDestination
>    [java] INFO: Creating destination for address
> local://RosetteTextAnalyzer
>
> It looks you create the same local transport destination in Webapp#2.
>
> AFAIK , if your two application are in the same JVM , the local transport
> should work :)
>
>
> Willem
>
>
>
>
> Benson Margulies wrote:
>
> > Webapp #1 sets up a service, with an endpoint on the local transport.
> >
> >      [java] INFO: Creating Service {urn:basistech.com:
> > rta}RosetteTextAnalyzer
> > from class com.basistech.rta.ws.RosetteTextAnalyzer
> >     [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
> > initDestination
> >     [java] INFO: Setting the server's publish address to be
> > local://RosetteTextAnalyzer
> >
> > Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
> > Unhappiness results. First, some diagnostic complaints from the RSFB
> > while
> > creating the proxy (this is all JAXWS+JAXB) then we get the complaint
> > that
> > no-one and nothing is listening. Will the local transport in fact work
> > across webapps? For that matter, are the complaints because all I've
> > given
> > the proxy factory to work on is an interface, and it doesn't have param
> > names? I've been working inside CXF for so long that I'm pretty lost
> > when I
> > just try to use it.
> >
> >  [java] Apr 9, 2008 9:11:34 PM
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromClass
> >     [java] INFO: Creating Service
> > {urn:basistech.com:rta}RosetteTextAnalyzerService
> > from class com.basistech.rta.RosetteTextAnalyzer
> >     [java] Apr 9, 2008 9:11:35 PM
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> > buildServiceFromClass
> >     [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type
> > QName
> > null.
> >     [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
> >     [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
> >     [java] {urn:basistech.com:rta:v1.0}glossaries part type QName null.
> >     [java]
> >     [java] Apr 9, 2008 9:11:35 PM
> > org.apache.cxf.transport.local.LocalTransportFactory createDestination
> >     [java] INFO: Creating destination for address
> > local://RosetteTextAnalyzer
> >     [java] Apr 9, 2008 9:11:35 PM
> > org.apache.cxf.phase.PhaseInterceptorChain doIntercept
> >     [java] INFO: Interceptor has thrown exception, unwinding now
> >     [java] java.lang.IllegalStateException: Local destination does not
> > have
> > a MessageObserver on address local://RosetteTextAnalyzer
> >
> >
> >
>
>

Re: Local transport is both up and down at the same time, sort of.

Posted by Willem Jiang <wi...@gmail.com>.
Hi Benson,

I am confused about the Webapp#2's log.

     [java] Apr 9, 2008 9:11:35 PM
org.apache.cxf.transport.local.LocalTransportFactory createDestination
     [java] INFO: Creating destination for address
local://RosetteTextAnalyzer

It looks you create the same local transport destination in Webapp#2.

AFAIK , if your two application are in the same JVM , the local transport should work :)


Willem



Benson Margulies wrote:
> Webapp #1 sets up a service, with an endpoint on the local transport.
>
>       [java] INFO: Creating Service {urn:basistech.com:rta}RosetteTextAnalyzer
> from class com.basistech.rta.ws.RosetteTextAnalyzer
>      [java] Apr 9, 2008 9:10:55 PM org.apache.cxf.endpoint.ServerImpl
> initDestination
>      [java] INFO: Setting the server's publish address to be
> local://RosetteTextAnalyzer
>
> Webapp #2 sets up a client proxy, trying to talk to the same endpoint.
> Unhappiness results. First, some diagnostic complaints from the RSFB while
> creating the proxy (this is all JAXWS+JAXB) then we get the complaint that
> no-one and nothing is listening. Will the local transport in fact work
> across webapps? For that matter, are the complaints because all I've given
> the proxy factory to work on is an interface, and it doesn't have param
> names? I've been working inside CXF for so long that I'm pretty lost when I
> just try to use it.
>
>   [java] Apr 9, 2008 9:11:34 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
>      [java] INFO: Creating Service
> {urn:basistech.com:rta}RosetteTextAnalyzerService
> from class com.basistech.rta.RosetteTextAnalyzer
>      [java] Apr 9, 2008 9:11:35 PM
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
>      [java] INFO: {urn:basistech.com:rta:v1.0}tokenResults part type QName
> null.
>      [java] {urn:basistech.com:rta:v1.0}languages part type QName null.
>      [java] {urn:basistech.com:rta:v1.0}matches part type QName null.
>      [java] {urn:basistech.com:rta:v1.0}glossaries part type QName null.
>      [java]
>      [java] Apr 9, 2008 9:11:35 PM
> org.apache.cxf.transport.local.LocalTransportFactory createDestination
>      [java] INFO: Creating destination for address
> local://RosetteTextAnalyzer
>      [java] Apr 9, 2008 9:11:35 PM
> org.apache.cxf.phase.PhaseInterceptorChain doIntercept
>      [java] INFO: Interceptor has thrown exception, unwinding now
>      [java] java.lang.IllegalStateException: Local destination does not have
> a MessageObserver on address local://RosetteTextAnalyzer
>
>