You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by Diego Louzán <di...@metalicana.org> on 2005/04/20 11:55:38 UTC
Possible problem with ProxyPortlet producer handling
These days I've been experimenting with the ProxyPortlet a little bit. When
trying to integrate it with producers other than WSRP4J's (in this case
with
NetUnity's) I had a hangout with the ProxyPortlet. Take a look at this code
from org.apache.wsrp4j.consumer.driver.ProducerImpl:
public ServiceDescription getServiceDescription(boolean newRequest)
throws WSRPException {
...
if (registrationContext == null &&
response.isRequiresRegistration()) {
register(consumerRegData);
getServiceDescription(true);
} else {
setServiceDescription(response);
}
...
}
This code does a recursive call to itself when it needs to do a
getServiceDescription-register-getServiceDescription sequence when
requiresRegistration == true. The problem arises when there's no
registration information included in the xml file of the producer (like
portlets/proxyportlet/war/WEB-INF/persistence/producers/org.apache.wsrp4j.consumer.driver.ProducerImpl@wsrp4j-8081.xml).
If there's no info like this:
<registration-data>
<consumer-name>WSRP4J Proxy Portlet</consumer-name>
<consumer-agent>WSRP4J Proxy Portlet</consumer-agent>
</registration-data>
then registrationContext is always null and response.isRequiresRegistration ==
true, so this code is executed on and on. Is this a Castor problem? Should we
redesign it? Is this the expected behaviour when there's no registration data?
Suggestions welcome.
Re: Possible problem with ProxyPortlet producer handling
Posted by Elliot Metsger <em...@jhu.edu>.
Hmm. I haven't dug into the Consumer or ProxyPortlet code yet (I'm
looking at Producer side stuff now)...
That said, then how does ProxyPortlet *ever* register with any Producer
that requires registration? I have uPortal 2.4 which uses Proxyportlet
consumer talking to a WSRP4J Producer which requires registration and
off hand I don't remember any issues.
I could be missing something though, as I'm very much learning the code now.
Elliot
Diego Louzán wrote:
> These days I've been experimenting with the ProxyPortlet a little bit. When
> trying to integrate it with producers other than WSRP4J's (in this case
> with
> NetUnity's) I had a hangout with the ProxyPortlet. Take a look at this code
> from org.apache.wsrp4j.consumer.driver.ProducerImpl:
>
> public ServiceDescription getServiceDescription(boolean newRequest)
> throws WSRPException {
>
> ...
>
> if (registrationContext == null &&
> response.isRequiresRegistration()) {
> register(consumerRegData);
> getServiceDescription(true);
> } else {
> setServiceDescription(response);
> }
>
> ...
>
> }
>
> This code does a recursive call to itself when it needs to do a
> getServiceDescription-register-getServiceDescription sequence when
> requiresRegistration == true. The problem arises when there's no
> registration information included in the xml file of the producer (like
> portlets/proxyportlet/war/WEB-INF/persistence/producers/org.apache.wsrp4j.consumer.driver.ProducerImpl@wsrp4j-8081.xml).
> If there's no info like this:
>
> <registration-data>
> <consumer-name>WSRP4J Proxy Portlet</consumer-name>
> <consumer-agent>WSRP4J Proxy Portlet</consumer-agent>
> </registration-data>
>
> then registrationContext is always null and
> response.isRequiresRegistration == true, so this code is executed on and
> on. Is this a Castor problem? Should we redesign it? Is this the
> expected behaviour when there's no registration data? Suggestions welcome.