• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

To the author: Portal applications communication on the same server

 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeff and David,

Assume that we have 2 Portlet applications (2 seperate WAR files) in the same application server. In case both of them are running together, could them exchange information to each other?

Do they the same for 2 Web applications to communicate each other?

Thanks for your opinion.

Nick
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid the Portlet specification doesn't provide any tools for the inter-application communication. The problem is the same as with 2 web applications wanting to communicate. Since the applications' code is loaded by two different ClassLoaders, they can't really use in-process communication (direct Java method calls) but instead must resort to other means -- typically over a network socket, usually in the form of HTTP requests to "localhost".

At least that's my perception of the "state of the art". I'd be glad to hear that I'm wrong.
 
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What about messaging? It could be used for this task?
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by David Ulicny:
What about messaging? It could be used for this task?


Yes, but that's just another layer on top of a TCP connection...
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I'm afraid the Portlet specification doesn't provide any tools for the inter-application communication.


That's the case.

However, if I really need this, that means, JSR 168 (or SUN's Portal APIs) does not help, isnt it?

Nick
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Yes, but that's just another layer on top of a TCP connection...


Again, as far as I know, messaging is not part of JSR 168, isnt it?

Nick
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:

Again, as far as I know, messaging is not part of JSR 168, isnt it?

Nick



Definitely no. I have scanned through the Portlet API specification already... I don't see any method that provides us to communicate among portal applications...
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In such sense, we can only make *our own* messaging connections by ourselves.

Seems to me the the JSR 168 coverage is not that much.

Nick
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
In such sense, we can only make *our own* messaging connections by ourselves.

Seems to me the the JSR 168 coverage is not that much.

Nick



I think there should be some kinda complimentary specification that cover such thing... In the same way as JTWI specification is a complimentary specification of MIDP, CLDC and so and so... There should be such kind of relationships in Portlet API specification as well, I guess...
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do think so. As now, we are planning to have a communication between Portal applications on different sites. Of course we can do our own, but in case the new JSR comes out, our system might then be non-compliant.

Nick
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
Hi Jeff and David,

Assume that we have 2 Portlet applications (2 seperate WAR files) in the same application server. In case both of them are running together, could them exchange information to each other?

Do they the same for 2 Web applications to communicate each other?

Thanks for your opinion.

Nick




In Java Portlet Specification 1.0 , i'm found some topic about Scope of Portlet Context.



PLT.10.2 Portlet Context functionality
Through the PortletContext interface, it is possible to access context initialization
parameters, retrieve and store context attributes, obtain static resources from the portlet
application and obtain a request dispatcher to include servlets and JSPs. 15




And

A portlet application is an extended web application.




So, portlet application is have properties/operation like Web application (Servlet). If you want to communicate across context , you can use portlet's context to solve.
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is JTWI ?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In fact, the specs just said we can do so, without how could we do that. Thus, we still need to write our own codes to do that.

Hence, the problem is, we just worried that someday, there will be a JSR which mention about this issue, and the implementation method differs from ours.

In fact, we can do whatever we wanna, if we do the coding. The problem is just whether we should do in this way.

Nick
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by David Ulicny:
What is JTWI ?



Java Technology for the Wireless Industry (JTWI), JSR 185

The Java Technology for the Wireless Industry (JTWI) specification defines the industry-standard platform for the next generation of Java technology-enabled mobile phones. JTWI is defined through the Java Community Process (JCP) as JSR 185 by an expert group of leading mobile device manufacturers, wireless carriers, and software vendors. It specifies the technologies that must be included in all JTWI-compliant devices, to minimize API fragmentation and broaden the substantial base of applications already developed for mobile phones


JTWI not related with Portlet topic...
[ November 11, 2004: Message edited by: somkiat puisungnoen ]
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


JTWI not related with Portlet topic...


JTWI is not for J2EE (portlet), it is for J2ME.

Nick
 
David Ulicny
Ranch Hand
Posts: 724
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


JTWI not related with Portlet topic



But you could access portal with mobile phone, or in general mobile device.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, so there is a mixed specification, but then, I wonder the mobile phone would not connect to the portlet directly, instead, it would connect to a gateway. Thus, the gateway will then need to understand how to connect with the mobile device, as well as the portlet application.

Nick
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and, talking about the mobile device to retrieve data from portal, IBM has done a good on it. It provides us a WebClipping tool for *selecting* suitable info for a mobile devices to read the content. Thus, we dont need to use programming effort to *trim* or *render* the layout for that.

However, we then shift the effort of programming to template development.

Nick
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
I do think so. As now, we are planning to have a communication between Portal applications on different sites.


What you mean "communication between Portal"?
If you mean call other Portlet in another portal Server, you can try WSRP.
For example, a portlet A in Portal server X, in Portal Server Y can call portlet A via WSRP.
I haven't try that, but in principle you can do that.
But as I know there has only one implementation, WSRP4J.
In addition, WSRP4J need work with JSR168 portlet engine(even just work on pluto), but there haven't many JSR168 compliant portlet engine in the market and work in production.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I know there has only one implementation, WSRP4J


We are going to use WSRP provided by IBM. This should be released on 30 Nov, but still, not much info from IBM still.

We wont use WSRP4J now, as if IBM releases its WSRP, we then need to rewrite our codes.

Nick
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic