2 Replies Latest reply on Oct 29, 2002 7:12 PM by rdelima

    JNI MBean

    rdelima

      Well, after finally getting JNI to work on Tru64 using an MBean...I am facing another problem. I have a native function that calls another function inside a shared library. The job of this external function is to create a communications channel to a Baan server. It looks like it is performing this operation correctly, but my native function has no handle to the resulting "socket". I have tried running the identical code outside of JBOSS and it works perfectly. Is there anything I should be setting in my MBean deployer to allow the Mbean to communicate with the outside world? Any help would be greatly appreciated.

      Thanks

        • 1. Re: JNI MBean

          not as far as I can think of

          what is the error you're having more specifically?

          when you're trying to code outside JBoss, is it still within an MBean server?

          • 2. Re: JNI MBean
            rdelima

            Thanks for the reply...

            There isn't any specific error. I think the MBean is operating correctly. From what I see, this is the process my MBean should follow:

            1) Load shared Library

            There are calls in the bean that do the following:

            2) Make a JNI Call to a Baan function called start_ci()
            'start_ci()' will create a special shell with the Baan server. From what I see, it spawns a new process and communicate back with its parent through a pipe. This process is the communications link to the Baan server.

            3) Make a JNI Call to make a query for the Baan server. Using the pipe from 2, the query is run and a result is returned.

            This is the problem: When start_ci() runs, it creates the process and the communication link, but the communication link loses scope for part 3. I have tried running these processes as seperate JNI calls and as a single JNI call. I still get the same result.

            I guess I need to know what I am doing wrong to lose scope..or is external process out of scope completely because it is outside the container?

            Thanks for your help in advance.