JavaBeat FAQs
FAVORITES
Download a movie FAQ
JAVABEAT
Home
Articles
Tips
QnA
Forums
FAQs Topics Books Topic
Java Java Books
Struts Struts Books
Spring Spring Books
Hibernate Hibernate Books
JBoss Seam Seam Books
J2EE J2EE Books
EJB EJB Books
JSF JSF Books
Servlets Servlets Books
JDBC JDBC Books
RMI RMI Books
JMS JMS Books
JNI JNI Books
Design Patterns Patterns Books
Exception Exception Books
Apache Ant Ant Books
Groovy
Cobertura
Quartz

Java Naming Service (JNI) - Interview Questions

JNI FAQs - 1 | JNI FAQs - 2 | JNI FAQs - 3

JNI Interview Questions - Part2


1)How to debug JNI code in CVM?


Porting Guide for the CDC and the Foundation Profile from SUN has a chapter on "C Debugging with GDB".


2)How can I check the status of a java Thread using JVMDI?


// ThreadTool.java class ThreadTool { public static final int THREAD_STATUS_UNKNOWN = -1; public static final int THREAD_STATUS_ZOMBIE = 0; ...


3)When reloading a Servlets that uses JNI, why do I get "java.lang.UnsatisfiedLinkError: Native Library D:\WINNT\mynamesearch.dll already loaded in another classloader" ?


The following link may shed some light on this: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4225434


4)Is there a COM Bridge that lets Windows developers create native client applications that access Enterprise JavaBeansTM (EJBTM) components deployed on a J2EE App server?


Yes. Take a look at: JavaTM 2 Platform, Enterprise Edition Client Access Services (J2EETM CAS) COM Bridge 1.0 Early Access.


5)What is necessary to have an applet call a native method? DLL installation, code signing, specific security permissions needed.


After more tries I solved the problem. I used your posted response about such a thing for Netscape. But was difficult to use that answer because Netscape...


6)JDK 1.4 has introduced the concept of direct buffers. Where can I get more information and/or samples for manipulating direct buffers?


JNI has been enhanced in v 1.4 to reflect a new feature of the java.nio package: direct buffers. The contents of a direct buffer can, potentially, reside...


7)What are the basic techniques for debugging mixed java and C++ code?


Debugging integrated Java and C/C++ code illustrates the two basic approaches using JNI (call C/C++ code from java, embed jvm in C/C++ code) and ways to...


EJB-JNI-Legacy Integration (C++ API) we have existing System in C++.We want to use Existing in the intranet/internet. We are using JNI to use existing System. And then we are calling JNI Classes in...

EJBs are supposed to be portable between different app servers who comply with the Sun's specifications for compliant EJB containers. Because of this reason,


8)Anyone know of a way of marking a Java thread as being a demon if it was "created" through the JNI AttachCurrentThread call?


Through a new method called AttachCurrentThreadAsDaemon.


9)What is Signal Chaining mechanism that has been implemented in JDK 1.4?


Signal-chaining enables the Java Platform to better interoperate with native code that installs its own signal handlers. The facility works on both Solaris and Linux platforms.

The signal-chaining facility was introduced to remedy a problem with signal handling in previous versions of the Java Hotspot VM. Prior to version 1.4, the Java Hotspot VM would not allow application-installed signal handlers for certain signals including, for example, SIGBUS, SIGSEGV, SIGILL, etc, since those signal handlers could conflict with the signal handlers used internally by the Java Hotspot VM.


The signal-chaining facility offers:

A. Support for pre-installed signal handlers when the Hotspot VM is created.
B. Support for signal handler installation after the Hotspot VM is created, inside JNI code or from another native thread.


Pre-installed signal handlers (A) are supported by means of saving existing signal handlers, for signals that are used by the VM, when the VM is first created. Later, when any of these signals are raised and found not to be targeted at the Java Hotspot VM, the pre-installed handlers are invoked. In other words, pre-installed handlers are "chained" behind the VM handlers for these signals.


10)Is there a TCL-Java Bridge?


Yes, The Tcl/Java project currently has two packages, Jacl and Tcl Blend. Jacl, which stands for Java Command Language, is a Java implementation of Tcl...


Related Articles
JAX-WS Web Services in NetBeans 6.1
JPA in NetBeans 6.1
EJB 3.0 and WebServices
Types of Managed Bean scopes in Spring Framework
OpenCms 7 Development
Liferay Portal Enterprise Intranets
ZK Developer’s Guide : Online Media Library
The BIRT Environment and Your First Report
AJAX - The Complete Reference
The Java 6.0 Compiler API
more articles
java6 ejb3 jsf hibernate eclipse ajax groovy spring seam java struts webservice j2me guice java5 jca tapestry soa linux ria books

Favorites
Buy movies
Access Control
Busby seo challenge contest
Sohbet
Chat
Webmaster Hosting Forum
Java Jobs
MyVideoLib
India News
Internet Advances
Sohbet
chat
Latest QnA
SCJD Tips
When we start a thread by applying start() method on it ,how does it knows that to execute run()method?
About Wrapper class in Java
How to configure weblogic 7.0 in MyEclipse?
Static Block and Static Initializer in Java

JavaBeat Website (2004-2008), India
javabeat | about us | planetoss
Copyright (2004 - 2008), JavaBeat