The following link goes into the part on starting up the JVM and invoking a
Java method from a C program which is the top level program. I think this
is close to the scenario which you are describing. This would probably be
the simplest way if you can count on a JVM on the client machine (where the
C program is). If you can't count on a JVM, you're probably not going to
get an ORB either; in which case I'd use sockets to talk from the C program
to another machine somewhere which has a Java program listening on a socket
on one side and calling the EJB on the other.
http://java.sun.com/docs/books/tutorial/native1.1/invoking/invo.html
Cheers
-----Original Message-----
From: John Harby [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 10:15 AM
To: [EMAIL PROTECTED]
Subject: Re: c program accessing ejb?
Take a look a the Java tutorial on JNI, one area specifically
might be:
http://java.sun.com/docs/books/tutorial/native1.1/implementing/method.html
>From: Michael Chen <[EMAIL PROTECTED]>
>Reply-To: A mailing list for Enterprise JavaBeans development
><[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: c program accessing ejb?
>Date: Wed, 28 Mar 2001 06:54:05 -0800
>
>I don't quite understand what you mean because when
>you use CORBA, large or small interfaces, an ORB is
>always required.
>
>The point I want to make to the original post is, it's
>a c CLIENT trying to call a SERVER. JNI is for
>functions in the same processs to call each other, not
>even outside the JVM. So JNI is not the answer. You
>only need JNI when you also created a Java client as a
>proxy to the EJB, so you use JNI for the c program to
>the Java client.
>
>--- John Harby <[EMAIL PROTECTED]> wrote:
> > I don't think CORBA makes a whole lot of sense for
> > just one call. If you are
> > building a large interface then running an ORB might
> > be the way.
> >
> >
> > >From: Michael Chen <[EMAIL PROTECTED]>
> > >Reply-To: A mailing list for Enterprise JavaBeans
> > development
> > ><[EMAIL PROTECTED]>
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: c program accessing ejb?
> > >Date: Tue, 27 Mar 2001 12:58:33 -0800
> > >
> > >It's associated with JNI but the least part.
> > >
> > >One way is to use CORBA, as long as your EJB server
> > >supports RMI-IIOP to/from outside.
> > >
> > >The other way is to write a Java client to talk to
> > >EJB, and your C program talks to the client code
> > with
> > >JNI.
> > >
> > >ps How to reply to a post?
> > >
> > >--- John Harby <[EMAIL PROTECTED]> wrote:
> > > > Sounds like you want JNI - this is an excellent
> > > > reference:
> > > >
> > > >
> >
>
>http://www.amazon.com/exec/obidos/ASIN/0136798950/o/qid=985722652/sr=8-1/re
f=aps_sr_b_1_1/102-0925929-2363329
> > > >
> > > >
> > > > >From: "Rhodes, Phillip C."
> > > > <[EMAIL PROTECTED]>
> > > > >Reply-To: A mailing list for Enterprise
> > JavaBeans
> > > > development
> > > > ><[EMAIL PROTECTED]>
> > > > >To: [EMAIL PROTECTED]
> > > > >Subject: c program accessing ejb?
> > > > >Date: Tue, 27 Mar 2001 14:41:50 -0500
> > > > >
> > > > >I need to write a C program to talk to an EJB
> > > > server to access a stateful
> > > > >session bean. Can someone give me a pointer to
> > > > where any information and
> > > > >examples can be found?
> > > > >
> > > > >I appreciate it.
> > > > >Phillip
> > > > >
> > > >
> > >
> >
>
>===========================================================================
> > > > >To unsubscribe, send email to
> > [EMAIL PROTECTED]
> > > > and include in the body
> > > > >of the message "signoff EJB-INTEREST". For
> > general
> > > > help, send email to
> > > > >[EMAIL PROTECTED] and include in the body
> > of
> > > > the message "help".
> > > > >
> > > >
> > > >
> >
> >_________________________________________________________________
> > > > Get your FREE download of MSN Explorer at
> > > > http://explorer.msn.com
> > > >
> > > >
> >
>
>===========================================================================
> > > > To unsubscribe, send email to
> > [EMAIL PROTECTED]
> > > > and include in the body
> > > > of the message "signoff EJB-INTEREST". For
> > general
> > > > help, send email to
> > > > [EMAIL PROTECTED] and include in the body of
> > the
> > > > message "help".
> > > >
> > >
> > >
> > >__________________________________________________
> > >Do You Yahoo!?
> > >Get email at your own domain with Yahoo! Mail.
> > >http://personal.mail.yahoo.com/?.refer=text
> > >
> >
>
>===========================================================================
> > >To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > >of the message "signoff EJB-INTEREST". For general
> > help, send email to
> > >[EMAIL PROTECTED] and include in the body of
> > the message "help".
> > >
> >
> >
>_________________________________________________________________
> > Get your FREE download of MSN Explorer at
> > http://explorer.msn.com
> >
> >
>===========================================================================
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff EJB-INTEREST". For general
> > help, send email to
> > [EMAIL PROTECTED] and include in the body of the
> > message "help".
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail.
>http://personal.mail.yahoo.com/?.refer=text
>
>===========================================================================
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff EJB-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".