Re: jni link error

2001-05-29 Thread Christopher Smith

--On Tuesday, May 15, 2001 09:34:50 -0700 Nathan Meyers 
<[EMAIL PROTECTED]> wrote:
> Zhihong Pan wrote:
>
>> I need jni in my java application. I created a shared library, and set
>> my library path (export LD_LIBRARY=/home/mydir/), but I still get the
>> following error message:java.lang.UnsatisfiedLinkError: no java_gsapi in
>> java.library.path. Could anybody help me ?
>
> You need LD_LIBRARY_PATH instead of LD_LIBRARY.

Can anyone explain to me why having the file in the path set in ld.so.conf 
shouldn't be enough?

--Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Signals, JNI and sigtimedwait()...

2001-05-29 Thread Christopher Smith

Okay, I'm writing some JNI code for some stuff using RT signals. I need to 
do some sigtimedwaits, which then post as IO events to the JVM. My original 
design was to have Java threads invoke something like waitForIO(), which 
was a native method which did the sigtimedwait(). Unfortunately, this seems 
like to cause problems for the JVM's GC.

Is the only solution to use native threads, have them "join" the VM to post 
events, and then have them "leave" the VM before invoking sigtimedwait() 
again? That seems just really slow and painful.

--Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Java/Linux at JavaOne

2001-05-29 Thread Nelson Minar

Took a quick look at the JavaOne schedule and saw two major Linux
related talks:

The Java 2 Platform, Standard Edition (J2SE) on Linux
  Sun telling us what's up
  http://servlet.java.sun.com/javaone/conf/sessions/1641/0-sf2001.jsp
  Tuesday June 5, 2:45 PM - 3:45 PM

The Penguin Gets Pumped Up . . . Turning Linux into a High-Powered
Java Technology-Based Application Server
  Java/Linux performance talk
  http://servlet.java.sun.com/javaone/conf/sessions/934/0-sf2001.jsp
  Friday June 8, 8:30 AM - 9:30 AM


The JavaTM 2 Platform on Linux
  Caldera and Blackdown folks, BoF
  http://servlet.java.sun.com/javaone/conf/bofs/1745/0-sf2001.jsp
  Monday June 4, 10:30 PM - 11:20 PM


 [EMAIL PROTECTED]
.   .  . ..   .  . . http://www.media.mit.edu/~nelson/


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: jni link error

2001-05-29 Thread Joi Ellis

On Tue, 29 May 2001, Christopher Smith wrote:

> 
> Can anyone explain to me why having the file in the path set in ld.so.conf 
> shouldn't be enough?

Heh.  Try getting the security nazis to agree to THAT for a user application.

I'm not sure, but I don't think the JVM uses ld to load its stuff.  Otherwise
why would it keel over when the shared library still has unresolved references?

-- 
Joi EllisSoftware Engineer
Aravox Technologies  [EMAIL PROTECTED], [EMAIL PROTECTED]

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
   - Chris Johnson


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: jni link error

2001-05-29 Thread Christopher Smith

--On Tuesday, May 29, 2001 17:21:41 -0500 Joi Ellis <[EMAIL PROTECTED]> wrote:
> On Tue, 29 May 2001, Christopher Smith wrote:
>
>>
>> Can anyone explain to me why having the file in the path set in
>> ld.so.conf  shouldn't be enough?
>
> Heh.  Try getting the security nazis to agree to THAT for a user
> application.

Umm... on most systems ld.so.conf can only be modified by root, and 
normally you only set it to include "safe" directories. I mean, if I can 
load in fake shared libraries into ld.so.conf, I can hose your system 
regardless (through libc for example).

--Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Java/Linux at JavaOne

2001-05-29 Thread Christopher Smith

--On Tuesday, May 29, 2001 15:01:25 -0700 Nelson Minar <[EMAIL PROTECTED]> 
wrote:
> The Penguin Gets Pumped Up . . . Turning Linux into a High-Powered
> Java Technology-Based Application Server
>   Java/Linux performance talk
>   http://servlet.java.sun.com/javaone/conf/sessions/934/0-sf2001.jsp
>   Friday June 8, 8:30 AM - 9:30 AM

That's mine. It should be fun. We're mostly going to focus on the 
scalability issue, which appears to be the major question on everyone's 
mind. If anyone thinks there are other things I should be speaking to, say 
it now. ;-)

--Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: jni link error

2001-05-29 Thread David Brownell

> I'm not sure, but I don't think the JVM uses ld to load its stuff.

If the JVM uses anything other than the standard dlsym()
I think it'd really be asking for trouble ... why would it want
to do that, anyway?




--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Java/Linux at JavaOne

2001-05-29 Thread ed phillips

Chris,

It might be helpful and may even spawn other suggestions if
you were to flesh out in a post some of the aspects, as you articulate them,
of scaling Java on Linux. Perhaps a kind of pre-BoF statement of the topic
to be discussed?

Thanks,

Ed Phillips



Christopher Smith wrote:

> --On Tuesday, May 29, 2001 15:01:25 -0700 Nelson Minar <[EMAIL PROTECTED]>
> wrote:
> > The Penguin Gets Pumped Up . . . Turning Linux into a High-Powered
> > Java Technology-Based Application Server
> >   Java/Linux performance talk
> >   http://servlet.java.sun.com/javaone/conf/sessions/934/0-sf2001.jsp
> >   Friday June 8, 8:30 AM - 9:30 AM
>
> That's mine. It should be fun. We're mostly going to focus on the
> scalability issue, which appears to be the major question on everyone's
> mind. If anyone thinks there are other things I should be speaking to, say
> it now. ;-)
>
> --Chris
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Java/Linux at JavaOne

2001-05-29 Thread ed phillips

Excuse me,

It is a session not a BoF, but the question still might be helpful
pre-session.



Christopher Smith wrote:

> --On Tuesday, May 29, 2001 15:01:25 -0700 Nelson Minar <[EMAIL PROTECTED]>
> wrote:
> > The Penguin Gets Pumped Up . . . Turning Linux into a High-Powered
> > Java Technology-Based Application Server
> >   Java/Linux performance talk
> >   http://servlet.java.sun.com/javaone/conf/sessions/934/0-sf2001.jsp
> >   Friday June 8, 8:30 AM - 9:30 AM
>
> That's mine. It should be fun. We're mostly going to focus on the
> scalability issue, which appears to be the major question on everyone's
> mind. If anyone thinks there are other things I should be speaking to, say
> it now. ;-)
>
> --Chris
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Java/Linux at JavaOne

2001-05-29 Thread Christopher Smith

--On Tuesday, May 29, 2001 21:25:20 -0700 ed phillips <[EMAIL PROTECTED]> 
wrote:
> It might be helpful and may even spawn other suggestions if
> you were to flesh out in a post some of the aspects, as you articulate
> them, of scaling Java on Linux. Perhaps a kind of pre-BoF statement of
> the topic to be discussed?

That's a good suggestion. Here goes:

The biggest problem with scaling Java on Linux are threads. No question 
about it. Linux 2.4.x is very scalable to even as many as 16 processors, 
with excellent network, memory, and disk performance (particularly now with 
XFS & ReiserFS). In my experience, most Java applications won't push the 
kernel's capabilities in these areas even on a $2000 1U server with a 
single processor, and those that do will find Linux scales just as well as 
everyone else.

So, the thread issue is a nasty one, particularly if you're say hosting 
servlets on Linux. 90% of the reason you need all these threads is due to 
the thread-per-IO model in standard Java I/O. Unfortunately, this doesn't 
map too efficiently to the 1-1 thread model found in most Linux JVM's. 
There are a few strategies for coping with this:

1) Use green threads (people don't normally think of this as an OK solution 
for an application server)
2) Have a C or other application multiplex the I/O either over sockets or 
JMS.
3) Use lots of boxes & tweak the kernel to allow as many threads as 
possible.
4) Use JNI to use Linux's various asynch I/O API's.

The good news is Linux's thread model is moving in a direction to better 
support Java's approach to I/O (IBM's next generation pthreads 
implementation), and Java's approach to I/O (NIO) is moving closer to the 
efficient way to do I/O with Linux. Indeed, we're working on some 
benchmarks right now for #4 and also using NIO to see just how far Linux 
will go. My bet is Linux is actually going to prove very cost-effective in 
terms of scalability with this stuff.

--Chris


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]