Problem calling EJB client thru JNI

Discussions

EJB programming & troubleshooting: Problem calling EJB client thru JNI

  1. Problem calling EJB client thru JNI (1 messages)

    Hi
     We are trying to invoke an EJB client from the C++ program
    thru JNI. The C++ program is not able to fetch the method id
    from the EJB client class. The method takes another Java object.
      My doubts are :

    1. is there any issue in calling the EJB client directly
    from the C++ program thru JNI (some EJB class visibility problem?)

    2. any problem in invoking methods which take Java Objects as parameters.

    Any help in this regard would be great

    Thanks
    Rajit

    Threaded Messages (1)

  2. Reply[ Go to top ]

    Rajit,

    I can't see any problems with calling any local methods from JNI...
    The only recommendation which applies is not to use JNI from EJB environment, but your case is completely vice versa.

    Your EJB client is supposed to be a regular Java application and should be contained within a public class.

    I can't tell what the exact problem is unless I see your EJB client and C++ JNI code fragments for better understanding.

    There is a jobject type in C/C++ which you can use for referencing Java Objects...

    Alex