struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Bond" <mar...@marcusbond.me.uk>
Subject RE: [OT] Searching for data access framework.
Date Mon, 05 Dec 2011 17:48:49 GMT
Perhaps Apache Shiro may be something you could utilise... you would
implement an LDAP 'realm' or a SQL realm that knows how to lookup
credentials and access privileges etc.
In their lingo "A Realm is essentially a security-specific DAO "  and out of
the box they provide a JDBC realm with suggested schema and, whilst I
haven't used it, they also have org.apache.shiro.realm.ldap.JndiLdapRealm
(abstract class available too if not quite what you're after) so you may be
able to save yourself a heap of implementation.

http://shiro.apache.org/realm.html
http://shiro.apache.org

I have used this framework as part of a Spring based web app using a custom
realm to authenticate users stored in CouchDB and also implemented a JPA  /
Hibernate realm (DAO), it's easy enough to get to grips with, active and
helpful mailing list and it seems to be catching on..

Cheers,
Marcus

-----Original Message-----
From: Balwinder [mailto:balwinder.mca@gmail.com] 
Sent: 05 December 2011 17:13
To: Struts Users Mailing List
Subject: Re: [OT] Searching for data access framework.

Hi Wes,

What I need is something like, if I want to access data from a database, i
can use SQL, but if i change the source to LDAP then the access mechanism
will change from SQL to LDAP specifics, now if the same data goes to flat
file than again my mechanism will change, so all I need is some framework
that if when source is changed its access mechanism should remain same. Hope
this explains what I am looking for.

Regards,
Balwinder Kumar

On 12/5/2011 10:35 PM, Wes Wannemacher wrote:
> I am not sure if I understand your question correctly, but the first 
> thing that comes to mind -
>
> http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObj
> ect.html
>
> I would say to combine a disciplined approach of separation with a 
> domain model layer, a business logic (transactional) layer and then 
> IoC with Spring...
>
> If you were looking for more detail than that, we'll need some more 
> details on your problem.
>
> -Wes
>
> On Mon, Dec 5, 2011 at 12:02 PM, Balwinder<balwinder.mca@gmail.com>
wrote:
>> Hi All,
>>
>> Can anyone suggest me a framework that can abstract the data call and 
>> its source, if there exists any? Example if I want to authenticate a 
>> user then my query shall not depend upon the data source, it could be 
>> any LDAP server, database or any file in a file system or anything else.
>>
>> Thanks in advance.
>>
>> Regards,
>> Balwinder Kumar
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message