tags:

views:

35

answers:

2

Is there any easy way to invoke a RMI method on a EJB from PHP? We have a java app and a PHP app that sometimes needs to talk to it. What we do now is have a java binary that PHP invokes when it needs to do something, but I would love to know if there is a way to do this directly from PHP?

A: 

maybe this helps you out. i'm facing the same problem at the moment and finally i decidet to do all i need via SOAP, using a java-webservise as server and the soap-client in php.

oezi
+1  A: 

There are a couple of options to tightly (or loosely) integrate PHP and Java. There are 2 PHP-Java bridge solutions out there. One open source, the other by Zend. http://php-java-bridge.sourceforge.net/pjb/

Alternatively, there is a product called Quercus which actually runs your PHP code in Java. You can then call anything that java can from inside PHP as if it was a native function. Quercus doesn't support ALL PHP functions and commands, but you can run WordPress under without changes. http://www.caucho.com/resin-3.0/quercus/

Brent Baisley