tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Juan Alvarez Ferrando <jaferra...@oviedo.syseca.es>
Subject Re: EJB on Tomcat !!
Date Fri, 14 Apr 2000 16:05:42 GMT
Thanks Jérôme for the tip.

Just to make it clear. It makes no sense to use Tomcat with Weblogic,
just to get EJB into Tomcat. Weblogic supports both Servlets and JSP and
though it's no so at the first line at implementing the last version of
the standards, it's a far more robust and scallable solution than
Tomcat, adn if you've payed for it at it's better and integrates better
Servlets+JSP into EJB why would you want to mix both?.
Each product has it's place and Tomcat is great when you need an Open
Source, free implementation and don't worry too much about support,
scallability, performance, robustness and all that spicy features
expected in a top-line enterprise solution.

Understand me, I love to have found and be able to use Tomcat, but I
wouldn't take it with me to a critical project.


Juan Alvarez Ferrando
"Fillon, Jérôme" wrote:
> 
> Hi,
> 
> you can also create a resource file (which is a java source) like :
> 
> public class MesResources extends ListResourceBundle
> {
>         static final Object[][] contents =
>         {
>         {"boutonajouter",  "Ajouter"},
>         {"FormatDate",  "dd-MM-yyyy"},
>         ...
>         // Fin des chaines à localiser
>         {"JNDIFactory", "com.sun.jndi.rmi.registry.RegistryContextFactory"},
>         {"JNDIURL", "rmi://172.20.7.91:1099"}
>         };
>    public MesResources () {
>           super();
>    }
>    public Object[][] getContents ( ) {
>           return contents;
>    }
> }
> 
> The main adavantage is that it is a java source without any other external
> file.
> To load it you need to use :
> 
> ResourceBundle FBundle = ResourceBundle.getBundle("Monpackage.MesResources
> ");
> Properties AProps = new Properties();
> AProps.put(Context.INITIAL_CONTEXT_FACTORY,
> FBundle.getString("JNDIFactory"));
> AProps.put(Context.PROVIDER_URL, FBundle.getString("JNDIURL"));
> InitialContext FContext = new InitialContext(AProps);
> 
> And your InitialContext is ready to lookup! :)
> 
> MesResources can be localized and i should name it MesResources_fr_CA or
> Mes_Ressources_fr_FR and Java (alone) will load the right resource file
> depending on the locale you are running on your OS... really really cool!
> 
> btw i`m running Tomcat 3.1 beta and JONAS (EJB) on win32 (they don`t want to
> use linux :( ) and everything is open-source so : really cool! :)
> 
> Jerome.
> 
> > -----Message d'origine-----
> > De:   Guillaume Rousse [SMTP:Guillaume.Rousse@univ-reunion.fr]
> > Date: vendredi 14 avril 2000 08:30
> > À:    tomcat-user@jakarta.apache.org
> > Objet:        Re: EJB on Tomcat !!
> >
> > Le ven, 14 avr 2000, vous avez écrit :
> > > Hi Gary,
> > >
> > > You can use Tomcat with WebLogic. I see no reason why you shouldn't be
> > > able to connect to the J2EE reference implementation.
> > > My biggest uncertainty is how you propagate the remote user to the
> > > application server. I guess you just add username and password to the
> > > InitialContext properties and maintain an access control list on the
> > > server, but I don't know if this is standardized. Maybe someone could
> > > elaborate on this?
> > I did it using a login session Bean, checking login and password in a
> > database.
> > The login jsp use this beans, and if response is successfull, stores a
> > boolean
> > true value named isLoggedIn in session object. Every other page look in
> > session
> > and redirect request if this condition is not met.
> >
> > > If you want a more detailed explanation of the connection procedure
> > > from e.g. a jsp page to an EJB, drop me a note.
> > What interest me rather is how to create an Initial Context with the
> > proper
> > JNDI parameters, without hard-coding those parameters. When i test my
> > applciation within Forte IDE, i got no problems using a jndi.properties
> > file
> > in my classpath, but that doesn't work under Tomcat.
> >
> > Regards
> > --
> > Guillaume
> > Original Message :
> > >
> > > On 4/14/00, 12:43:41 PM, Gary Frederick <gary.frederick@jsoft.com> wrote
> >
> > > regarding Re: EJB on Tomcat !!:
> > >
> > >
> > > > Can we use tomcat 3.1 with J2EE?
> > > >   or
> > > > How much work would it be to replace the version in J2EE with tomcat
> > > 3.1?
> > >
> > > > Has anyone got that working?
> > >
> > > > Gary
> > >
> > > > Peder Pedersen wrote:
> > >
> > > > > Hi Manpreet,
> > > > > Tomcat is not an application server so you cannot deploy EJBs in
> > > > > Tomcat. However, you can certainly use EJBs from Servlets, JSPs,
> > > > > Interceptors, etc, running within Tomcat (if that is your question).
> > > > > Create an Initial Context with the proper JNDI parameters, and you
> > > > > should be able to access your EJBs.
> > > > >
> > > > > B.r.
> > > > >  - Peder
> > > > >
> > > > > Original Message dated 4/13/00, 5:55:47 PM
> > > > > Author: <msingh@india-today.com>
> > > > > Re: EJB on Tomcat !!:
> > > > >
> > > > > Hi everybody,
> > > > >
> > > > > Can we run Enterprise Java Beans on Tomcat ?
> > > > > If yes, how ?
> > > > >
> > > > > Thanks in advance,
> > > > > Manpreet Singh
> > > > >
> > > > >
> > > > >
> > >
> > --------------------------------------------------------------------------
> > > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > > > --
> > > > gary.frederick@jsoft.com
> > > > Husband to Susan, Father to Elizabeth
> > > > Terrapin Station Homeschool
> > > > ... computers, homeschooling, Friends, Family and God.
> > > > <http://www.jsoft.com>
> > >
> > > > ><> ><> ><>
> > >
> > > > "some do and some don't"
> > > >   Eeyore on Romans 12:4-5
> > >
> > >
> > >
> > > >
> > > -----------------------------------------------------------------------
> > > ---
> > > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > >
> > >
> > >
> > >
> > >
> > --------------------------------------------------------------------------
> > > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> > --
> > Guillaume Rousse
> >
> > Iremia - Université de la Réunion
> > 15 avenue René Cassin, BP 7151
> > 97715 Saint Denis, messagerie cedex 9
> > Tel:0262938330 Fax:0262938260 ICQ:10756815
> >
> > And now, some words for our sponsor :
> > Explosives, guns, assassination, conspiracy, primers, detonators, Kakadan,
> > initiators, main charge, nuclear charges, ambush, sniping, motorcade, IRS,
> > ETA, FARC, Cuba, Castro, Che Guevara, revolution, ATTAC, BATF, jtf-6...
> >
> >
> > --------------------------------------------------------------------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org

Mime
View raw message