Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2006

Tip: Looking for answers? Try searching our database.

Java facade to Ada code?

Thread view: 
kk_oop@yahoo.com - 22 Mar 2006 14:03 GMT
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
Gordon Beaton - 22 Mar 2006 14:15 GMT
> 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

Signature

[  do not email me copies of your followups  ]
g o r d o n + n e w s @  b a l d e r 1 3 . s e

Roedy Green - 22 Mar 2006 22:37 GMT
> 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
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

kk_oop@yahoo.com - 23 Mar 2006 00:35 GMT
> On 22 Mar 2006 05:03:20 -0800, kk_oop@yahoo.com wrote, quoted or

<snip>

> 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
Roedy Green - 23 Mar 2006 01:41 GMT
>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.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

TechBookReport - 23 Mar 2006 15:17 GMT
> 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
[quoted text clipped - 8 lines]
>
> 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.

Signature

TechBookReport Java http://www.techbookreport.com/JavaIndex.html



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.