Feature #76

Java bindings using JNI

Added by Madars Vitolins over 1 year ago. Updated 6 days ago.

Status:NewStart date:04/23/2018
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:-
Target version:-

CallingCLibraryRoutinesfromJava.pdf (523 KB) Madars Vitolins, 11/13/2017 02:35 PM


Subtasks

Feature #307: error codes in string format - needed for JAVA exception buildingClosed

History

#1 Updated by Madars Vitolins over 1 year ago

  • Subject changed from Java bindings to Java bindings using JNI

#9 Updated by Madars Vitolins about 1 year ago

Technology sample: http://java-gnome.sourceforge.net/HACKING.html
$ git clone git://github.com/afcowie/java-gnome.git java-gnome

#20 Updated by Madars Vitolins about 2 months ago

  • Tracker changed from Bug to Feature

#24 Updated by Madars Vitolins about 1 month ago

- Inside JNI functions, firstly we shall set the context manually, and then use standard tp commands (not O).

- When JNI error occurs, throw runtime exception. For ATMI errors, instantiate ATMI exception. For example if context is NULL.

#25 Updated by Madars Vitolins about 1 month ago

ndrxconfig.xml could look like:

        <servers>
                <server name="someprocess">
                        <srvid>1</srvid>
                        <min>1</min>
                        <max>1</max>
                        <interpret>java -jar someprocess_package.jar</interpret>
                        <sysopt>-e /tmp/RECOVER -r</sysopt>
                        <appopt>-c10</appopt>
                </server>

So "someprocess" becomes logical name of the given server. But shall give options for formatting the command. There could be option for logical name in format string and the sysopt and appopt too:

        <servers>
                <server name="someprocess">
                        <srvid>1</srvid>
                        <min>1</min>
                        <max>1</max>
                        <sysopt>-e /tmp/RECOVER -r</sysopt>
                        <appopt>-c10</appopt>
                        <interpret>java -jar ${NDRX_PROCESS}_package.jar -- ${NDRX_SYSOPT} ${NDRX_APPOPT}</interpret>
                </server>

Which would in the final make following runnable:

java -jar someprocess_package.jar -e /tmp/RECOVER -r  -c10

#26 Updated by Madars Vitolins about 1 month ago

This will require some changes in housekeep processes, as real executable will be java.

#31 Updated by Madars Vitolins 20 days ago

We need following interface for service advertise:

interface Server {
   public void tpSvrInit(string [] argv);
   public void tpSvrDone();
}

interface Service {
  public void tpService(TpSvcInfo svcinfo);
}

Also available in: Atom PDF