From: <php...@li...> - 2012-07-11 16:24:02
|
I'm using JavaBridge to run some java from within a command line PHP script. The java code connects to a sonicmq server and started to download data. When the PHP script exists the java code remains connected to the sonicmq server, which prevents and new connections. Sonicmq complains that a user is still logged in. My question is: From PHP how can I terminate the java code I initiated from PHP? Thanks. |
From: <php...@li...> - 2012-07-11 16:45:01
|
You probably don't want to terminate the Java process every time your script runs. I assume that would be very messy in a servlet environment. Instead, see what Java call(s) you need to make to disconnect from SonicMQ and have your PHP invoke it when finished. Thanks, Brandon On Wed, Jul 11, 2012 at 12:23 PM, < php...@li...> wrote: > > I'm using JavaBridge to run some java from within a command line PHP > script. The java code connects to a sonicmq server and started to > download data. When the PHP script exists the java code remains > connected to the sonicmq server, which prevents and new connections. > Sonicmq complains that a user is still logged in. > > My question is: From PHP how can I terminate the java code I initiated > from PHP? > > Thanks. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2012-07-11 17:26:55
|
Maybe you should close the connection before finishing your PHP script ? Sylvain Filteau Programmeur/Analyste sfi...@ad... ADA Consultants Inc 432 Boul. René-Lévesque Ouest Québec, QC Canada, G1S 1S3 Tel.: 1 (418) 907-5904 Fax: 1 (418) 907-9261 2012/7/11 <php...@li...> > > I'm using JavaBridge to run some java from within a command line PHP > script. The java code connects to a sonicmq server and started to > download data. When the PHP script exists the java code remains > connected to the sonicmq server, which prevents and new connections. > Sonicmq complains that a user is still logged in. > > My question is: From PHP how can I terminate the java code I initiated > from PHP? > > Thanks. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > |
From: <php...@li...> - 2012-07-11 17:50:24
|
I don't want to terminate the Java process, just anything started as a result of my PHP script's connection to the JavaBridge. There are 100s of classes to look through to see how to close things down. With the command line version is was a simple Control-C to kill everything off. I was hoping there was a simple method with JavaBridge to shutdown everything started by a script, such as when a user hits Control-C on the PHP script. I guess I'll keep searching. Thanks. On Wed, 2012-07-11 at 12:44 -0400, php...@li... wrote: > You probably don't want to terminate the Java process every time your > script runs. I assume that would be very messy in a servlet environment. > > Instead, see what Java call(s) you need to make to disconnect from SonicMQ > and have your PHP invoke it when finished. > > Thanks, > Brandon > > On Wed, Jul 11, 2012 at 12:23 PM, < > php...@li...> wrote: > > > > > I'm using JavaBridge to run some java from within a command line PHP > > script. The java code connects to a sonicmq server and started to > > download data. When the PHP script exists the java code remains > > connected to the sonicmq server, which prevents and new connections. > > Sonicmq complains that a user is still logged in. > > > > My question is: From PHP how can I terminate the java code I initiated > > from PHP? > > > > Thanks. > > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > php-java-bridge-users mailing list > > php...@li... > > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users |
From: <php...@li...> - 2012-07-11 20:51:22
|
Hi, you can register a http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequestListener.htmland do your cleanup there. Or register your library with the web app and termiate it when the app shuts down., see this example http://php-java-bridge.sourceforge.net/pjb/examples/source.php?source=report.php But if the libary you use is prepared to run in a servlet environment, you don't need to track its resources. |