Java facade to Ada code?

K

kk_oop

Hi. My team has a bunch of legacy Ada code. Our new code is being
written in Java. However, we still have many complex algorithms
written in thousands of lines of Ada. Rather than rewriting the
tested/validated Ada code in Java, we'd like to create a Java facade
that would delegate to the Ada code, thereby making the Ada code
available to newer Java client objects. Is this reasonable (as opposed
to rewriting everything in Java)? Anyone know what
mechanisms/libraries would support such an approach?

Thanks!

Ken
 
G

Gordon Beaton

Hi. My team has a bunch of legacy Ada code. Our new code is being
written in Java. However, we still have many complex algorithms
written in thousands of lines of Ada. Rather than rewriting the
tested/validated Ada code in Java, we'd like to create a Java facade
that would delegate to the Ada code, thereby making the Ada code
available to newer Java client objects.

If Ada has a C binding you can use JNI to incorporate the code more or
less directly into your Java application.

Otherwise your best bet is probably to use a socket to communicate
between the Java and Ada parts of the application.

/gordon
 
R

Roedy Green

Anyone know what
mechanisms/libraries would support such an approach?

It is a lot of work. You might try porting and gluing a small pilot
to see which is more work.

You need JNI and some C code to interface between Java and Ada.

Another approach is to write an Ada server that accepts requests on a
socket, much as if it were a web app.

see http://mindprod.com/jgloss/jni.html
 
K

kk_oop

Roedy said:
On 22 Mar 2006 05:03:20 -0800, (e-mail address removed) wrote, quoted or

You need JNI and some C code to interface between Java and Ada.

Would this enable communication in both directions (Java to C to Ada
and Ada to C to Java)? Do you know where I could find more information
on this approach?

Thanks!

Ken
 
R

Roedy Green

Would this enable communication in both directions (Java to C to Ada
and Ada to C to Java)? Do you know where I could find more information
on this approach?

yes. look at the link I gave you in my previous post.
 
T

TechBookReport

Hi. My team has a bunch of legacy Ada code. Our new code is being
written in Java. However, we still have many complex algorithms
written in thousands of lines of Ada. Rather than rewriting the
tested/validated Ada code in Java, we'd like to create a Java facade
that would delegate to the Ada code, thereby making the Ada code
available to newer Java client objects. Is this reasonable (as opposed
to rewriting everything in Java)? Anyone know what
mechanisms/libraries would support such an approach?

Thanks!

Ken
Is it possible to expose the ADA functionality as a web service? If so
then this is likely to be more flexible than trying to rewrite or
resorting to JNI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top