Hi all,
I've been working on an Inline::Java implementation for about 2 weeks now,
and I'm about half way through.
The first reason I didn't inform this mailing list of my activities is that
I didn't (and still don't) know how much time I'll be able to put into this
project. The second reason is that I'm developing this in a different way
and I don't know if it will be approved by the Inline community.
Here goes! I think all the existing Inline modules use the .so/DynaLoader
technology. I didn't know how to do this in Java (is it possible? The only
way I could think of was to use an open source Java SDK link it into a .so).
So the way I went about Inline::Java is the following:
1- The build() function compiles the users Java code (plus other stuff) into
a Java executable.
2- The load() function forks+execs the Java executable (java) and starts the
code. My wrapper code actually start a small server. Then the perl
scripts connects via TCP to the Java program.
3- The java server listens on the socket and serves all the requests using
the java.lang.reflect API. All created objects are kept in a HashMap so they
can be referenced.
4- On the perl side the objects store basically an objid to the Java object.
5- Then AUTOLOAD and tie do their magic...
Like I mentioned this is somewhat different from the other Inline modules,
but I think it should work OK.
This is also the first CPAN perl module I write, so the release time
overhead might be heavy at first.
That's it for now. Comments are of course welcome.
Thanks,
Patrick LeBoutillier
----- Original Message -----
From: "bykovski, val" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Val Bykovski (E-mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, February 21, 2001 3:41 PM
Subject: any plans on Inline::Java? - just a naive question...
Val Bykovski
800-445-2588 ext. 23155
[EMAIL PROTECTED]
EMC²
Where Information Lives