From: <php...@li...> - 2006-10-12 16:16:45
|
Hi, I am wanting to use your php-java-bridge to share httpsession data between a php application and a j2ee application and also for the php applicaton to communicate with some java session facades as an alternative to SOAP based calls. I have had mixed success with the various configurations described in the documentation and would appreciate comments on the most optimal solution. I am finding the documentation a little confusing :( >From what I have read the c-based extension seems to be an obvious choice and running PHP using the Apache module rather than the embedded J2EE AS option seems the safest. Like I said, I have played around - the solution that seemed to work best was when I had the .php files removed from the JavaBridge.war and placed into my Apache doc_root. I had also copied the java directory from the war to the doc_root (I had to update the php.ini include_directory) and I removed the cgi directory from WEB-INF (I wanted to make sure the PHP pages were being served by Apache). With this I was able to run the sessionSharing example - the RMI/IIOP example failed but I have seen a few posts here regarding this... Anyway, I am not sure if the above configuration is correct/desirable - I am sure that now I am using the pure php php/java bridge implementation, I think this because with the java directory (with the php files) things don't work. I have the following configuration: Apache 2.0.59 PHP 5.1.6 mod_jk 1.2.19 Jboss 4.0.4 Java 1.5 We are using Apache to server static content like images and html, we are also using it to serve PHP. We have the following rules for a virtual host: # Dynamic content JkMount _/* worker # Static content JkUnMount _/*.gif worker (more like the above - including _/*.php) I am not really sure if I need the JkAutoAlias also.. Any help/comments most welcome. Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: <php...@li...> - 2006-10-13 07:19:54
|
HI am such an idiot - I don't need the java/*.php files, I just needed to remove the line: require_once("java/Java.php"); from the top of the sample pages... So now I know I am using the c-based extension and I can run the most of the examples. I am, however, getting a javax.naming.NameNotFoundException when I try the document example. I am running with Jboss. BTW - Has anybody had any success with using this bridge with Spring beans (in Java) if so, how do I go about accessing these? Code example will be great. Thanks php...@li... wrote: Hi, I am wanting to use your php-java-bridge to share httpsession data between a php application and a j2ee application and also for the php applicaton to communicate with some java session facades as an alternative to SOAP based calls. I have had mixed success with the various configurations described in the documentation and would appreciate comments on the most optimal solution. I am finding the documentation a little confusing :( >From what I have read the c-based extension seems to be an obvious choice and running PHP using the Apache module rather than the embedded J2EE AS option seems the safest. Like I said, I have played around - the solution that seemed to work best was when I had the .php files removed from the JavaBridge.war and placed into my Apache doc_root. I had also copied the java directory from the war to the doc_root (I had to update the php.ini include_directory) and I removed the cgi directory from WEB-INF (I wanted to make sure the PHP pages were being served by Apache). With this I was able to run the sessionSharing example - the RMI/IIOP example failed but I have seen a few posts here regarding this... Anyway, I am not sure if the above configuration is correct/desirable - I am sure that now I am using the pure php php/java bridge implementation, I think this because with the java directory (with the php files) things don't work. I have the following configuration: Apache 2.0.59 PHP 5.1.6 mod_jk 1.2.19 Jboss 4.0.4 Java 1.5 We are using Apache to server static content like images and html, we are also using it to serve PHP. We have the following rules for a virtual host: # Dynamic content JkMount _/* worker # Static content JkUnMount _/*.gif worker (more like the above - including _/*.php) I am not really sure if I need the JkAutoAlias also.. Any help/comments most welcome. Send instant messages to your online friends http://uk.messenger.yahoo.com ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Send instant messages to your online friends http://uk.messenger.yahoo.com |
From: <php...@li...> - 2006-10-13 17:11:51
|
Hi, just a quick reply, I haven't read your messages yet; > files, I just needed to remove the line: > > require_once("java/Java.php"); > > from the top of the sample pages... We should probably encapsulate them, for example with if(!extension_loaded('java')) require_once("java/Java.php"); > I am, however, getting a > javax.naming.NameNotFoundException when I try the > document example. It should work; I have tested the sample against the current jboss release. There's a FAQ entry for it. > BTW - Has anybody had any success with using this > bridge with Spring beans (in Java) if so, how do I > go about accessing these? Code example will be > great. Please see the JSF examples for more information how to use IOC (Fowler calls it "dependency injection"). I think Spring directly supports JSF beans, so that should be pretty easy. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de |
From: <php...@li...> - 2006-10-13 17:49:18
|
Thanks for your reply. I now have successfully called an EJB3 Stateless Session Bean using this fantastic bridge in Jboss 4.0.4.GA (ejb3 install). I am however, having a little problem with logging - as soon as my EAR with a modified WAR (i removed all the files not necessary for my deployment) is deployed my console locks up. I have managed to connect to the log4j output using Chainsaw so I know things are still working. Has anyone else had similar problems? Found any solutions - I think it's probably a property I haven't passed over when starting Jboss for a port or something... Paul php...@li... wrote: Hi, just a quick reply, I haven't read your messages yet; > files, I just needed to remove the line: > > require_once("java/Java.php"); > > from the top of the sample pages... We should probably encapsulate them, for example with if(!extension_loaded('java')) require_once("java/Java.php"); > I am, however, getting a > javax.naming.NameNotFoundException when I try the > document example. It should work; I have tested the sample against the current jboss release. There's a FAQ entry for it. > BTW - Has anybody had any success with using this > bridge with Spring beans (in Java) if so, how do I > go about accessing these? Code example will be > great. Please see the JSF examples for more information how to use IOC (Fowler calls it "dependency injection"). I think Spring directly supports JSF beans, so that should be pretty easy. Regards, Jost Boekemeier ___________________________________________________________ Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ php-java-bridge-users mailing list php...@li... https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users --------------------------------- All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine |
From: <php...@li...> - 2006-10-16 17:32:28
|
Hi, [please excuse the delay] > I am wanting to use your php-java-bridge to share > httpsession data between a php application and a > j2ee application and also for the php applicaton to > communicate with some java session facades as an > alternative to SOAP based calls. > > I have had mixed success with the various > configurations described in the documentation and > would appreciate comments on the most optimal > solution. I am finding the documentation a little > confusing :( I agree that the documentation is currently in a horrible state. But unfortunately we don't have any time to update or to rewrite it at the moment. > >From what I have read the c-based extension seems > to be an obvious choice and running PHP using the > Apache module rather than the embedded J2EE AS > option seems the safest. Not necessarily. Running PHP within a J2EE AS is faster than the Apache prefork MPM. The only problem with this setup is that java cannot drop privileges (due to posix constraints), so you need a native wrapper which forwards the request from the HTTP or HTTPS port to the unprivileged 8080 or 8443 ports. In most cases this "native wrapper" is either Apache with mod_jk or Apache with PHP and the PHP/Java Bridge. > Anyway, I am not sure if the above configuration is > correct/desirable Certainly. Your setup is described in fig. #3 in the README. > We are using Apache to server static content like > images and html, we are also using it to serve PHP. > We have the following rules for a virtual host: > > # Dynamic content > JkMount _/* worker > > # Static content > JkUnMount _/*.gif worker > (more like the above - including _/*.php) > > I am not really sure if I need the JkAutoAlias > also.. I can't comment on this one because I have not much experience with mod_jk. We usually set the Apache DocumentRoot to the J2EE AS webapps directory and set up a .htaccess file. Regards, Jost Boekemeier ___________________________________________________________ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de |