• Post Reply Bookmark Topic Watch Topic
  • New Topic

Wrap Java with C  RSS feed

Chris Cody
Posts: 2
C++ Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am sorry if this is the wrong place or if this question has been repeated too many times.
[I did look and did not find an answer.]
The short version is that I have been instructed to wrap a set of objects and methods in a Jar file from a C based application.
Is this possible, if so what resources exist to do this?

The longer version:
There is a deployment that exists as a set of EJBs on a web server (Weblogic).
There exists a C application (in Solaris Unix) that is required to send information to and retrieve messages from the EJB.
There exists a Jar file containing the interface and stubs in order to connect to the EJB from another EJB or from another Java application.
There does not exist a set of interfaces that are available to the C application.
The "managerial" solution is that the Jar file should be wrapped by the C code and use the Java objects to access the EJB.

Is there a way to get this done, or is there a better way to do it?

My suggestion is to create a Java application that connects natively through the libraries to the EJB and then write a TCP/IP interface between the C application and the Java application.

Any technical advice would be greatly appreciated.
I would also appreciate sage advice about how to tactfully describe the managerial solution as a very bad idea [If it is as bad as it appears to be].

Thank you very much in advance.

Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure, if you have C library(s) that can do what you want.

However, on the assumption that it is not there, there is no technical feasibility to wrap Java objects in C code.

Further, you may talk with EJB via CORBA/ORB/IDL technique, a quite cumbersome and complicated approach (without support IDEs etc...).
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!