3 Replies Latest reply on Jul 18, 2003 12:55 AM by frito

    EJB/JNI

    tsip

      Hello,

      After reading some forums it seems that you are not allowed to load native libary with jni in EJB for some security reasons. But with some application servers (for instance weblogic) can get around of this by removing a security. My question is that possible with jboss? And how to do it? I know that you can use CORBA,... but in our actual software you have already implement the JNI.

      thanks

        • 1. Re: EJB/JNI
          m_roderick

          Hi,
          I don't have an answer for your question but have the same question myself with a little twist. The EJB doesn't load the library directly but uses a helper class to do so. Have you found out anymore information? I am now trying to configure JBoss to enforce the Java 2 Platform Security policy discussed in EJB 1_1 spec chapter 18.2 to see if our system breaks. Unfortunately I cannot find the point with these securities are configured (only things like users and method access).
          I would appreciate any feedback that you have!

          Mary

          • 2. Re: EJB/JNI
            tcrampton

            Hi,

            From a JSP we've been trying to use an EJB as a wrapper around a JAVA class that has a native interface to a C++ dll. We can't get past "java.lang.UnsatisfiedLinkError: ".

            We have read all of the forum messages we could find on this subject and have implemented the suggestions. We have even changed to "System.load" from "System.loadLibrary" to no avail. We have also tried calling a class containing the native interface from the JSP using the "<jsp:useBean..." tag.

            Any suggestions would be appreciated.

            • 3. Re: EJB/JNI
              frito

              The spec says you must not use native code in your EJB. A normal wrapper won't help at all since a wrapper tries to hide the implementation for the coder using the wrapper.
              The best way to do these things is to use a MBean doing the native things. Let your EJB talk to the MBean (a MBean wrapper if you like ;-)

              Greetings,
              Frito