[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - PHP-Servlet-EJB - design choice?

nightnic do-not-reply at jboss.com
Wed Jul 16 16:33:49 EDT 2008


Hi,

I'm looking into implementing an EJB-based service for integration into existing web-site. Website is written on PHP and hosted on standard ISP hosting. There is also a dedicated server which is the base for business logic processing.

My goal is to implement business logic processing using high-level language with adequate debugging abilities, e.g. Java, employ HTTP-based connectivity and make little change to existing website code.

Here is design I came up with: there is a PHP class on website-side, which provides business logic methods (i.e. getProductListing(), sendOrder() and such). 
This class translates incoming method calls to HTTP requests on socket, which connects to a servlet on dedicated server. The servlet handles requests with help of EJB and sends back an XML response. XML response received by same PHP wrapper class, processed with XSLT and displayed on web site page. 
Servlet and EJB running under JBoss AS.

Here go the questions:

1. Is there anything to be improved in this design?

2. There is an issue of handling session contexts. Servlet cannot discern users, since from its standpoint, there is only one connection source - PHP wrapper class. So there is need for PHP wrapper to manually supply JSESSIONID cookie from servlet to the browser and back. 
Do you think there is any better way to handle this?

3. Which is the best way to handle session context on servlet/EJB side? I'm looking at JBoss Seam, but not convinced it will do because of previous issue. I'm looking into manually implementing session context tracking on servlet side, but there probably is a better solution?

Please let me know your opinion on this design. Feedback is much appreciated.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4164843#4164843

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4164843



More information about the jboss-user mailing list