7 messages in net.java.dev.jna.usersRe: [jna-users] JVM-Crash with JNA
FromSent OnAttachments
Gregor B. RosenauerOct 14, 2007 2:08 pm 
Timothy WallOct 14, 2007 2:37 pm 
Gregor B. RosenauerOct 15, 2007 2:32 pm 
Timothy WallOct 15, 2007 4:22 pm 
Gregor B. RosenauerOct 20, 2007 10:38 am 
Gregor B. RosenauerNov 27, 2007 8:21 am 
Timothy WallNov 27, 2007 9:45 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] JVM-Crash with JNAActions...
From:Timothy Wall (twal@dev.java.net)
Date:Nov 27, 2007 9:45:48 am
List:net.java.dev.jna.users

On Nov 27, 2007, at 11:21 AM, Gregor B. Rosenauer wrote:

* initialize the library not in JBI's BootStrap or LifeCycle, but in a separate singleton-class that cleanly limits access to the library over a single interface (the lib seems not to be multithreading-friendly) and lazily initializes the lib on first use (which is in the BindingComponent's processIn()-method)

FYI, there's a Native.synchronizedLibrary() that puts a synchronized block around all accesses to a given native library. This doesn't necessarily ensure thread safety, but it does prevent multiple simultaneous accesses to the library.