On my locahost I am able to connect my php server codes to a java base code running on my netbeans via a javabridge imported class. The code for the java is below
public class Listener {
public static final String JAVABRIDGE_PORT = "xxxx";//8080
static final php.java.bridge.JavaBridgeRunner runner =
php.java.bridge.JavaBridgeRunner.getInstance(JAVABRIDGE_PORT);
/**
* @param args the command line arguments
* @throws java.lang.InterruptedException
*/
public static void main(String[] args) throws InterruptedException {
// TODO code application logic here
runner.waitFor();
System.exit(0);
}
}
but now am moving to this cool hosting site openshift
for production and I need to do the same exact thing. My confusion is what application do I use in my openshift to run my java code. A couple of options I see available are JBOSS
and TOMCAT
but not sure how to go about this and with little research I know both applications are java EE for running java in web applications but is it the right tool for me or is there something else.