> Yep, you don't want to hardcode your JNDI properties if you want your EJBs
> to be portable.  But I don't think you can't put them in a properties file
> since reading from files is prohibited in the EJB spec (1.1 spec, 18.1.2).

The spec only says that the Bean should not use the java.io package to access
files/directories. This does not mean that the services/Container (in this case
JNDI) cannot use files.

- Viquar

>
> I'm told some (most?) EJB vendors don't enforce this restriction, but if you
> want to ensure portability you shouldn't do it.  I'd imagine you should add
> these JNDI properties in your deployment descriptor as environment entries
> <env-entry>.  The only problem I see with that approach is the fact you'd be
> duplicating the same entries in a number of different deployment
> descriptors.
>
> Jeff Bailey ([EMAIL PROTECTED])
> Sr. Software Engineer
> NetGenics, Inc.
>
> -----Original Message-----
> From: Thomas Cox [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 12, 1999 9:46 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Subject: Weblogic / J2EE - which is better?
>
> As far as writing your EJBs - they should be portable to any EJB compliant
> server, be it WebLogic, WebSphere, Sapphire Web, Gemstone/J - whatever.  So
> you
> should be able to get any evaluation copy to write and test your EJBs
> without
> worrying about porting your EJBs to a different server.
>
> However, your clients may not be as portable if you are not careful.  Each
> vendor can implement the JNDI call differently, so if you don't pull your
> JNDI
> properties out into a text file, you'll find yourself rewriting and
> compiling
> your clients based on the server.
>
> This is particularly scary when one EJBean calls (becomes a client of)
> another
> EJBean.
>
> In fact - could anyone help me out with ideas about this?  Am I write about
> just
> putting the JNDI properties out in a file that any EJB or client can access
> in
> order to get the initial context necessary to access an EJB?  So far I have
> been
> hard coding the JNDI properties into my getInitialContext methods, but that
> was
> just for prototyping and testing.
>
> As far as servers go, I've only tried WebLogic so far and it is working
> fine.
> We are evaluating WebLogic and WebSphere because the vendors seem the most
> stable and established and the servers have adequate features.  But what are
> other people using?  Does anyone know what the base server product is going
> to
> be out of the Sun/Netscape alliance?  It seems like they have a lot to
> integrate
> before we see something stable from them.
>
> And is J2EE a server?  I thought that was just a specification.  I confess I
> have not done my reading on that yet.
>
> Tom Cox
>
> _________________________________________________________
>
> Tom Cox
> Solution Center of the Americas   Phone:   +1.612.397.4226
> 400 One Financial Plaza           Fax:     +1.612.692.4226
> 120 South Sixth Street            Alt Fax: +1.612.397.4370
> Minneapolis, MN 55402             e-mail:  [EMAIL PROTECTED]
> _________________________________________________________
>
> ------------------------------
>
> Date:    Mon, 11 Oct 1999 15:09:59 +0530
> From:    Nittle Gupta <[EMAIL PROTECTED]>
> Subject: Weblogic / J2EE - which is better?
>
> Hi All,
>         I am new to EJB technology.I am unable to decide which application
> server to prefer - Weblogic or J2EE or any other else.I need to decide
> this before writing any EJBeans because later on I can't afford any
> problem.Any body can lead me to the write decision.
> with regards,
> nittile gupta ([EMAIL PROTECTED])
>
> ------------------------------
>
> ===========================================================================
> 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".
begin:vcard
n:Hussain;Viquar
tel;fax:(650)286-2475
tel;work:(650)358-2431
x-mozilla-html:FALSE
org:<IMG SRC="http://www.inprise.com/images/inpr_sm.jpg">
adr:;;951 Mariner's Island Blvd.;San Mateo;CA;94404;USA
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;19584
fn:Viquar Hussain
end:vcard

Reply via email to