[libinline-java-perl] 383/398: documentation errors
Jonas Smedegaard
dr at jones.dk
Thu Feb 26 11:43:27 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.55
in repository libinline-java-perl.
commit 9224b0840e145c75e486462ea80736e2f4502832
Author: patrick_leb <>
Date: Fri Oct 2 14:20:44 2009 +0000
documentation errors
---
Java.pod | 31 ++++++++++++++++++++++++-------
Java/Callback.pod | 5 +++--
2 files changed, 27 insertions(+), 9 deletions(-)
diff --git a/Java.pod b/Java.pod
index ff75bec..453a868 100644
--- a/Java.pod
+++ b/Java.pod
@@ -135,10 +135,8 @@ make use of the same JVM.
=item PORT
-Specifies the starting port number for the server. If many
-C<Inline::Java> blocks are declared, the port number is
-incremented each time. Default is 0 (next available port number),
-default for SHARED_JVM mode is 7891.
+Specifies the port number for the server. Default is -1 (next
+available port number), default for SHARED_JVM mode is 7891.
Ex: PORT => 4567
@@ -1046,7 +1044,28 @@ code in a package with a unpredictable name.
See the BUGS AND DEFICIENCIES section if you have problems starting
the SHARED_JVM server under MOD_PERL.
- Z<>
+
+=head2 Preloading and PerlChildInitHandler
+
+If you are loading C<Inline::Java> during your server startup (common practice to
+increase shared memory and reduce run time) and you are using C<SHARED_JVM>, then
+your Apache processes will all share the same socktd connection to that JVM.
+This will result in garbled communication and strange errors (like "Can't receive packet from JVM", "Broken pipe", etc).
+
+To fix this you need to tell Apache that after each child process has forked they
+each need to create their own connections to the JVM. This is done during the
+C<ChildInit> stage.
+
+For Apache 1.3.x this could look like:
+
+ # in httpd.conf
+ PerlChildInitHandler MyProject::JavaReconnect
+
+And C<MyProject::JavaReconnect> could be as simple as this:
+
+ package MyProject::JavaReconnect;
+ sub handler($$) { Inline::Java::reconnect_JVM() }
+ 1;
=head1 BUGS AND DEFICIENCIES
@@ -1120,8 +1139,6 @@ For information about other Inline languages, see L<Inline-Support>.
C<Inline::Java>'s mailing list is <inline at perl.org>.
To subscribe, send an email to <inline-subscribe at perl.org>
-
-C<Inline::Java>'s home page is http://inline.perl.org/java/
Z<>
diff --git a/Java/Callback.pod b/Java/Callback.pod
index d14e882..2106c57 100644
--- a/Java/Callback.pod
+++ b/Java/Callback.pod
@@ -267,8 +267,9 @@ in Perl. Here's an example:
=for comment
-The StartCallbackLoop method can be called on any InlineJavaPerlCaller object
-and will block the current thread and allow the reception of callbacks through
+The StartCallbackLoop method can be called on any
+C<org.perl.inline.java.InlineJavaPerlCaller> object and will block the
+current thread and allow the reception of callbacks through
any InlineJavaPerlCaller that has been created by the same (current) thread.
The only way to interrupt such a StartCallbackLoop method is to call the
StopCallbackLoop method on any C<org.perl.inline.java.InlineJavaPerlCaller>
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libinline-java-perl.git
More information about the Pkg-perl-cvs-commits
mailing list