• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Wrap Java with C

 
Greenhorn
Posts: 2
Eclipse IDE C++ 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.


 
Ranch Hand
Posts: 312
MS IE Java
  • 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...).
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!