[libinline-java-perl] 258/398: 0.44

Jonas Smedegaard dr at jones.dk
Thu Feb 26 11:43:11 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 82f9b1f98b7c2d38f2cdc8b1d4ff5df6663aeb55
Author: patrick_leb <>
Date:   Mon Dec 8 01:37:11 2003 +0000

    0.44
---
 Java.pod                                           |  7 -----
 Java/Array.pm                                      |  2 +-
 Java/Callback.pm                                   |  2 +-
 Java/Class.pm                                      |  2 +-
 Java/JNI.pm                                        |  2 +-
 Java/JVM.pm                                        |  2 +-
 Java/Object.pm                                     |  2 +-
 Java/Portable.pm                                   |  2 +-
 Java/Protocol.pm                                   |  2 +-
 .../org/perl/inline/java/InlineJavaProtocol.java   |  2 +-
 .../org/perl/inline/java/InlineJavaServer.java     | 32 +++++++++++++++++-----
 Makefile.PL                                        |  1 -
 README                                             |  4 ---
 TODO                                               |  2 +-
 14 files changed, 35 insertions(+), 29 deletions(-)

diff --git a/Java.pod b/Java.pod
index 435ca96..16963fa 100644
--- a/Java.pod
+++ b/Java.pod
@@ -27,13 +27,6 @@ Inline::Java - Write Perl classes in Java.
 
 =for comment
 
-=head1 WARNING 
-
-THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable. 
-It is also possible that some elements of the interface (API) will 
-change in future releases.
-   Z<>
-
 
 =head1 DESCRIPTION
 
diff --git a/Java/Array.pm b/Java/Array.pm
index 2a26fbd..cdb840d 100644
--- a/Java/Array.pm
+++ b/Java/Array.pm
@@ -4,7 +4,7 @@ package Inline::Java::Array ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Array::VERSION = '0.43' ;
+$Inline::Java::Array::VERSION = '0.44' ;
 
 # Here we store as keys the knots and as values our blessed objects
 my $OBJECTS = {} ;
diff --git a/Java/Callback.pm b/Java/Callback.pm
index 69ea028..718e722 100644
--- a/Java/Callback.pm
+++ b/Java/Callback.pm
@@ -3,7 +3,7 @@ package Inline::Java::Callback ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Callback::VERSION = '0.43' ;
+$Inline::Java::Callback::VERSION = '0.44' ;
 
 $Inline::Java::Callback::OBJECT_HOOK = undef ;
 
diff --git a/Java/Class.pm b/Java/Class.pm
index 81aaa93..82e936d 100644
--- a/Java/Class.pm
+++ b/Java/Class.pm
@@ -3,7 +3,7 @@ package Inline::Java::Class ;
 use strict ;
 use Carp ;
 
-$Inline::Java::Class::VERSION = '0.43' ;
+$Inline::Java::Class::VERSION = '0.44' ;
 
 $Inline::Java::Class::MAX_SCORE = 10 ;
 
diff --git a/Java/JNI.pm b/Java/JNI.pm
index 5e07f0d..76477a0 100644
--- a/Java/JNI.pm
+++ b/Java/JNI.pm
@@ -4,7 +4,7 @@ package Inline::Java::JNI ;
 
 use strict ;
 
-$Inline::Java::JNI::VERSION = '0.43' ;
+$Inline::Java::JNI::VERSION = '0.44' ;
 
 use DynaLoader ;
 use Carp ;
diff --git a/Java/JVM.pm b/Java/JVM.pm
index ac82e40..8688017 100644
--- a/Java/JVM.pm
+++ b/Java/JVM.pm
@@ -7,7 +7,7 @@ use IPC::Open3 ;
 use IO::File ;
 use IO::Socket ;
 
-$Inline::Java::JVM::VERSION = '0.43' ;
+$Inline::Java::JVM::VERSION = '0.44' ;
 
 my %SIGS = () ;
 
diff --git a/Java/Object.pm b/Java/Object.pm
index 4e95130..a42f008 100644
--- a/Java/Object.pm
+++ b/Java/Object.pm
@@ -5,7 +5,7 @@ use strict ;
 use Inline::Java::Protocol ;
 use Carp ;
 
-$Inline::Java::Object::VERSION = '0.43' ;
+$Inline::Java::Object::VERSION = '0.44' ;
 
 # Here we store as keys the knots and as values our blessed private objects
 my $PRIVATES = {} ;
diff --git a/Java/Portable.pm b/Java/Portable.pm
index f3a9d26..e3f67ae 100644
--- a/Java/Portable.pm
+++ b/Java/Portable.pm
@@ -11,7 +11,7 @@ use Cwd ;
 use File::Find ;
 use File::Spec ;
 
-$Inline::Java::Portable::VERSION = '0.43' ;
+$Inline::Java::Portable::VERSION = '0.44' ;
 
 # Here is some code to figure out if we are running on command.com
 # shell under Windows.
diff --git a/Java/Protocol.pm b/Java/Protocol.pm
index 8f92928..2317858 100644
--- a/Java/Protocol.pm
+++ b/Java/Protocol.pm
@@ -5,7 +5,7 @@ use Inline::Java::Object ;
 use Inline::Java::Array ;
 use Carp ;
 
-$Inline::Java::Protocol::VERSION = '0.43' ;
+$Inline::Java::Protocol::VERSION = '0.44' ;
 
 my %CLASSPATH_ENTRIES = () ;
 
diff --git a/Java/sources/org/perl/inline/java/InlineJavaProtocol.java b/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
index b16eea6..59c472d 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaProtocol.java
@@ -65,7 +65,7 @@ class InlineJavaProtocol {
 		}
 		else if (c.equals("die")){
 			InlineJavaUtils.debug(1, "received a request to die...") ;
-			System.exit(0) ;
+			ijs.Shutdown() ;
 		}
 		else {
 			throw new InlineJavaException("Unknown command " + c) ;
diff --git a/Java/sources/org/perl/inline/java/InlineJavaServer.java b/Java/sources/org/perl/inline/java/InlineJavaServer.java
index 0ed1829..1114786 100644
--- a/Java/sources/org/perl/inline/java/InlineJavaServer.java
+++ b/Java/sources/org/perl/inline/java/InlineJavaServer.java
@@ -15,6 +15,8 @@ public class InlineJavaServer {
 	private boolean shared_jvm = false ;
 	private boolean priv = false ;
 
+	private boolean finished = false ;
+	private ServerSocket server_socket = null ;
 	private InlineJavaUserClassLoader ijucl = null ;
 	private HashMap thread_objects = new HashMap() ;
 	private int objid = 1 ;
@@ -41,19 +43,18 @@ public class InlineJavaServer {
 		shared_jvm = new Boolean(argv[2]).booleanValue() ;
 		priv = new Boolean(argv[3]).booleanValue() ;
 
-		ServerSocket ss = null ;
 		try {
-			ss = new ServerSocket(port) ;	
+			server_socket = new ServerSocket(port) ;	
 		}
 		catch (IOException e){
 			InlineJavaUtils.Fatal("Can't open server socket on port " + String.valueOf(port) +
 				": " + e.getMessage()) ;
 		}
 
-		while (true){
+		while (! finished){
 			try {
 				String name = "IJST-#" + thread_count++ ;
-				InlineJavaServerThread ijt = new InlineJavaServerThread(name, this, ss.accept(),
+				InlineJavaServerThread ijt = new InlineJavaServerThread(name, this, server_socket.accept(),
 					(priv ? new InlineJavaUserClassLoader() : ijucl)) ;
 				ijt.start() ;
 				if (! shared_jvm){
@@ -66,12 +67,14 @@ public class InlineJavaServer {
 				}
 			}
 			catch (IOException e){
-				System.err.println("IO error: " + e.getMessage()) ;
-				System.err.flush() ;
+				if (! finished){
+					System.err.println("Main Loop IO Error: " + e.getMessage()) ;
+					System.err.flush() ;
+				}
 			}
 		}
 
-		System.exit(1) ;
+		System.exit(0) ;
 	}
 
 
@@ -244,6 +247,21 @@ public class InlineJavaServer {
 	}
 
 
+	synchronized void Shutdown(){
+		if (! jni){
+			try {
+				finished = true ;
+				server_socket.close() ;
+			}
+			catch (IOException e){
+				System.err.println("Shutdown IO Error: " + e.getMessage()) ;
+				System.err.flush() ;
+			}
+		}
+		System.exit(0) ;
+	}
+
+
 	/*
 		Here the prototype accepts Threads because the JNI thread
 		calls this method also.
diff --git a/Makefile.PL b/Makefile.PL
index c0b4af4..fde6e5a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -96,7 +96,6 @@ my $src = File::Spec->catfile($src_dir, '*.java') ;
 my $obj_dir = File::Spec->catdir('Java', 'classes') ;
 my $server_arch = File::Spec->catfile('Java', 'InlineJavaServer.jar') ;
 my $user_arch = File::Spec->catfile('Java', 'InlineJavaUser.jar') ;
-my $src_arch = File::Spec->catfile('Java', 'InlineJavaSource.jar') ;
 
 
 sub MY::top_targets {
diff --git a/README b/README
index d830943..e412225 100644
--- a/README
+++ b/README
@@ -66,10 +66,6 @@ second time you test loading of an already built module.
 -------------------------------------------------------------------------------
 FEATURES:
 
-WARNING: THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable. 
-         It is also possible that some elements of the interface (API) will 
-         change in future releases.
-
 Inline::Java version 0.44 is a major upgrade that includes:
 + Callbacks from multiple threads are now supported
 + Refactored (again...) studying/.jdat/cache stuff
diff --git a/TODO b/TODO
index f223220..db838c5 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,6 @@
 CODE:
 - Do more test for CLASSPATH combinations
-- Document PRIVATE mode
+- Does STDIN still need to be closed in the JVM?
 
 TEST:
 - Alpha

-- 
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