Hi Charles,
The service doesnt have to be CORBA, it could just as easily be an RMI
server that performs the JNI call for you. The idea is that the level of
indirection makes your EJB portable.
Most containers will let you make a JNI call from your EJB, but recommend
you dont - mainly for portability issues.
If you have a controlled environment for your EJB - it will only run on a
certain platform, all of the time, then it will work. Depending on what the
call does, making an external service may be an overkill - I guess it's up
to you to weigh up the pro's/con's.
Kind Regards,
-Robert
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Charles Paclat
Sent: Tuesday, March 28, 2000 10:19 PM
To: [EMAIL PROTECTED]
Subject: Re: EJB and JNI
Agreed that CORBA is probably the perferable way of integrating C++ and
Java. However, the price that you end up paying is that you add an
additional layer of indirection. That layer is likely unneccessary if you
are willing to pay the price for porting. In our situation we are
integrating with a number of vendors that have supplied a JNI interface to
their functionality. We would also like to keep EJB as a consistent
component model since the implementation of service that we are wrapping may
or may not be C++. So the criteria must be that if any one of N third
parties that we are integrating is not in Java the service must be CORBA?
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert Castaneda
Sent: Monday, March 27, 2000 7:55 PM
To: [EMAIL PROTECTED]
Subject: Re: EJB and JNI
Not too sure, the reason for disallowing this is so that beans are platform
neutral. Not all C++ code is, so you could never make "out-of-the-box" EJB's
that you could guarantee to work on each platform using the JNI approach.
Remember, we're making J2EE applications, not just EJB applications. CORBA
allows you to do this transparently, and is part of the J2EE.
http://java.sun.com/j2ee/corba/
kind regards,
-Rob
-----Original Message-----
From: A mailing list for Enterprise JavaBeans development
[mailto:[EMAIL PROTECTED]]On Behalf Of Tony Holderith
Sent: Tuesday, March 28, 2000 10:24 AM
To: [EMAIL PROTECTED]
Subject: Re: EJB and JNI
There should be a 'safe' way to allow (certify) an EJB to use JNI. This
is a relatively common need.
Tony
----
Robert Castaneda wrote:
>
> You could wrapper the C++ code inside a C++ CORBA server and then call
this
> CORBA server from your EJB.
>
> -Rob
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Charles Paclat
> Sent: Tuesday, March 28, 2000 3:21 AM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB and JNI
>
> It sounds from quote as though there needs to be some tags in the
deployment
> descriptor that specifies that a given component relies on a native
library
> and have the container load that library. I was unable to find evidence
of
> this in the EJB specification. The only other option would be to create a
> resource that is loaded by the application server. This makes you
> application server specific anyways.
>
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Aravind Naidu
> Sent: Monday, March 27, 2000 7:36 AM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB and JNI
>
> You should not use JNI inside an EJB.
> See Section 18.1.2 of the EJB spec, on programming restrictions.
>
> An extract below.
>
> <Quote>
> � The enterprise bean must not attempt to load a native library.
> This function is reserved for the EJB Container. Allowing the enterprise
> bean to load native code would create a security hole.
> </Quote>
>
> -- Aravind
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Ulrich Kriegel
> > Sent: Monday, 27 March 2000 18:55
> > To: [EMAIL PROTECTED]
> > Subject: EJB and JNI
> >
> >
> > Hi there,
> > we will encapsulate an C++ calculation module as an EJB. Exists any
> > exprience about the performance of EJBs using JNI to delegate work to
> > C++-modules. What about the status of an C++-module in case the
> > container moves the EJB to secondary store?
> > --
> > Thanks
> > --ukriegel
> > ---------------------------------------------------------------------
> > Dr. E.Ulrich Kriegel, [EMAIL PROTECTED],
> > Fraunhofer ISST, Mollstra�e 1, D-10178 Berlin, Germany
> > tel: (++49(0)30) 243 06 446 fax: (++49 (0) 30) 24306 199.
> > For public key either send mail with subject ##public-key or look at
> > http://www.isst.fhg.de/~ukriegel/public-key.html
> > =====================================================================
> >
> > ==================================================================
> > =========
> > 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".
>
>
===========================================================================
> 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".
--
Tony Holderith | Interactive Business Solutions
[EMAIL PROTECTED] | NetCentric Solutions
http://www.interactivebusiness.com | Business Objects
voice: 310.414.6760, 805.893.4503 | fax: 310.414.6759
Don't connect to the Internet - be there. IBS
===========================================================================
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".
===========================================================================
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".