How to add a Java backend to an existing PHP site without adding a tomcat server for Java Bridge?

We are currently using PHP for our websites. Now we are thinking of writing a backend in Java, due to the safety of language types and the availability of all kinds of tools for Java. I read about Java Bridge and now I am wondering how to install it.

We use PHP already through Apache. I read that to use Java Bridge I also need to install Tomcat. This means that I have two servers (Apache and Tomcat), and I need to add protection for the backend, because it is open to the whole wide world all of a sudden ... Am I missing something? Is there any other way to make a PHP-Java connection without an additional server? How is this usually done?

Any instructions or links on how to do this or any recommendations on how to configure it are welcome. I did not find the official Java Bridge website very understandable. Thank!

+5
source share
4 answers

Zend Java. PHP/Java . , Java , - ( Tomcat 6). Zend -. - Java-, ( ) . java- Zend JVM, -classpath Zend Java,

Ex dos:

C:\Development\ToolsPHP\ZendServer\bin > java -classpath javamw.jar; mybusinesslogic.jar -Dzend.javamw.port = 10002 com.zend.javamw.JavaServer.

, 10001, , ( netstat -a ). , Zend , php script Apache, Zend ( ), Zend Java, 10002 Zend .

-, Java pojo, Spring, JPA Hibernate.

+3

tomcat. Java

java -Djava.ext.dirs = lib -jar JavaBridge.jar HTTP_LOCAL: 8080 2 logfile &

lib Java, .

+3
0
source

You can look at Gearman. this is not exactly what you are looking for, but it allows Customers and Workers in different languages. As a good side effect, it allows parallel processing of background jobs;)

0
source

All Articles