Results 1 to 6 of 6

Thread: Session Sharing Java portlets / PHP

  1. #1
    Join Date
    Jan 2010
    Posts
    99

    Session Sharing Java portlets / PHP

    Maybe someone here has an idea of how it is possible to make data from a Portletsession a PHP application to access and vice versa to write from the PHP application data into the portlet session, that will then be available in the portlet? In fact, imagine the following scenario.

    On Oracle AS Portal is a portlet that has different data. From this portlet is invoked in a new browser window, a PHP page, which is on a different web server / domain. This page contains data from the portlet session to pass (not via GET). Later, the PHP Web application will in turn return data to the portlet, so that these data are sent to the same portlet session, from which the PHP page is called. I have some approaches, but I can imagine that it is also easier. I was initially very confident in the PHP Java Bridge, which in retrospect turned out, however confusing than anything. I also assume that a direct communication is not possible (or is it?). I think that data exchange must take place via web services. But then the data must restore the land from PHP to Java in the right portlet session. Is that possible? About the exchange SessionID? So hoping that someone over there will help me.!!

  2. #2
    Join Date
    Mar 2008
    Posts
    227

    Re: Session Sharing Java portlets / PHP

    Hi,
    such a similar problem I had last year. It was this question from PHP / Apache and Servlet / JBoss exchange data. Just like that at the session of the other access is not imho. Furthermore, it would disturb my imagination, the ideal scalability. You can do this with Webservcies, but in my current project, we use it, and somehow I feel very static Web services as inflexible and somehow (not to want to start a flamewar discussion). On the last project we have therefore provided as a web service alternative to a servlet, which has adopted JSON requests. Gibts in PHP for JSON in Java as well as many Libs, and I've even started even times one, but I am not finished yet.

  3. #3
    Join Date
    Dec 2008
    Posts
    183

    Re: Session Sharing Java portlets / PHP

    JSON is a JavaScript notation and very lightweight. If you make a clean format define, you will save you even some overhead, even the purely by the length of the web service is XML tags transferred. This is JSON a little bit harder to read than XML, which the XML Web service might not necessarily be read as "light" is to be considered. Is somehow a matter of taste. Another alternative is to JSON web service or Hessian. A direct exchange brings more problems than likely use, so I would strike the target before you by way already. Hope this helps you.!!

  4. #4
    Join Date
    Jan 2010
    Posts
    99

    Re: Session Sharing Java portlets / PHP

    First thanks for your answer. Sort of like you describe I have my thought. With JSON, I've also done a good experience. In order to reuse and UDDI / SOA capability, but I wanted to share more on Web than pure servlets. The data exchange is taking place is not my real problem, but rather as calling the servlet / web services from within PHP needs to land the data passed in the correct target session. In principle, it must be possible to pass JavaSessionID to PHP and later with the return to Java vonPHP this SessionID to the Java servlet / web service to pass, which then opens the session and associated data adds. This data must be in the portlet (for a Action Request) to be retrieved.

  5. #5
    Join Date
    Dec 2008
    Posts
    202

    Re: Session Sharing Java portlets / PHP

    We used the idea to hold two sessions, and sync-but this is a nerve-racking act as a solution we had just one layer made "stupid" in our case, PHP. Php must therefore invite each call, the session data. Whether that was good .... at least it was a workable solution in a cluster area, so we did not have to sessions synchronizing in both layers, but only in the JBoss cluster.

  6. #6
    Join Date
    Jan 2009
    Posts
    140

    Re: Session Sharing Java portlets / PHP

    However, if you absolutely must identifies a session in the other: if it's just a PHP server is you can use eg PHPSESSID and pass them as JSESSID. One would have to weigh everything again, but this could be a pragmatic approach. A very nice solution would not now occur to me right away-just whatever comes to the overall environment on it. Forgot: you connect to servlet from PHP via PHP socket can still open classes? We did it that way and it was one-time only the max. socket number "check" on both sides.

Similar Threads

  1. Replies: 4
    Last Post: 17-01-2011, 11:14 AM
  2. Replies: 4
    Last Post: 24-12-2010, 07:58 AM
  3. Experience with portlets
    By Zia 7 in forum Software Development
    Replies: 5
    Last Post: 20-09-2010, 09:16 PM
  4. Replies: 3
    Last Post: 31-07-2009, 01:09 PM
  5. java code example set time_zone oracle session
    By Recko in forum Software Development
    Replies: 3
    Last Post: 29-07-2009, 01:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,858,122.17852 seconds with 17 queries