What i try to achieve is use EJB's methods in the authentication process to avoid the raw SQL to get the user from my DB.
I'll try both options. -----Messaggio originale----- Da: José Luis Cetina [mailto:[email protected]] Inviato: venerdì 7 marzo 2014 15:32 A: [email protected] Oggetto: Re: LowTypedRealm Hi Piercarlo, what i did and im using it, is a class that extends org.apache.catalina.realm.RealmBase class, then in my class i just overwrote some methods, i could pass my sql query to this class using the context.xml file, using something like this <Realm className="com.anypackage.TheNameOfMyClass"......., then my class return the authenticated user against a database checking their roles etc, i could retrive the principal with any issue in my ejb's. Im not sure is what are you looking for. 2014-03-07 8:15 GMT-06:00 Romain Manni-Bucau <[email protected]>: > Hi > > LowTypedRealm is a kind of hack to deploy the realm with the app. The > normal way is to do a realm module you add in the container and > configure in server.xml JAASRealm and configure your login module > using the standard jaas system property. > > some info in this thread > http://web.archiveorange.com/archive/v/mnKpLAD2LnoZfGUTlcx4 > > *Romain Manni-Bucau* > *Twitter: @rmannibucau <https://twitter.com/rmannibucau>* > *Blog: **http://rmannibucau.wordpress.com/*< > http://rmannibucau.wordpress.com/> > *LinkedIn: **http://fr.linkedin.com/in/rmannibucau > <http://fr.linkedin.com/in/rmannibucau>* > *Github: https://github.com/rmannibucau > <https://github.com/rmannibucau>* > > > > 2014-03-07 14:56 GMT+01:00 Piercarlo Alberto Beghetto - Diennea < > [email protected]>: > > > Hi all, > > > > > > > > i'm working on a java web application using EJBs and I'm looking > > at the container authentication for a secured access to the beans. > > > > > > > > I found some discussions about an alternative implementation of > > TomEE Realm (org.apache.tomee.catalina.realm.LowTypedRealm) to > > customize the authentication process. > > > > > > > > I suppose i need to implement a FORM authentication in the web > application > > and use SessionContext in EJBs to manage the authenticated Principal. > > > > Since I can't find enough documentation for this personalization do > > you > have any suggestion about the implementation of this Class? > > > > > > > > > > > > *Piercarlo Alberto Beghetto* > > Developer @ Diennea - MagNews > > Tel.: (+39) 0546 667432 - Int. 967 > > Viale G.Marconi 30/14 - 48018 Faenza (RA) > > > > [image: Magnews.it] <http://www.magnews.it/it> > > > > [image: Linkedin] > > <http://www.linkedin.com/company/diennea---magnews> > [image: > > Twitter] <http://twitter.com/DienneaMagNews> [image: Facebook]< > http://www.facebook.com/pages/MagNews/197617841797> > > [image: Newsletter]< > http://www.magnews.it/it/iscriviti-alla-newsletter> > > > > > > > > ------------------------------ > > Rimani aggiornato sul mondo dell'email marketing e del digital marketing: > > visita il nostro blog! http://blog.magnews.it > > > -- ------------------------------------------------------------------- *José Luis Cetina* ------------------------------------------------------------------- Rimani aggiornato sul mondo dell’email marketing e del digital marketing: visita il nostro blog! http://blog.magnews.it
