[OT] Searching for data access framework.

2011-12-05 Thread Balwinder
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.

Re: [OT] Searching for data access framework.

2011-12-05 Thread Wes Wannemacher
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/DataAccessObject.html I would say to combine a disciplined approach of separation with a domain model layer, a business logic (transactional)

Re: [OT] Searching for data access framework.

2011-12-05 Thread Eric Lentz
abstract the data call and its source Not a Struts question, but an easy answer, so here you go: http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the

Re: [OT] Searching for data access framework.

2011-12-05 Thread Josep García
Use spring-security. 2011/12/5 Balwinder balwinder@gmail.com 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

Re: [OT] Searching for data access framework.

2011-12-05 Thread Balwinder
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

Re: [OT] Searching for data access framework.

2011-12-05 Thread Łukasz Lenart
Check JDO http://www.datanucleus.org/products/index.html Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail:

Re: [OT] Searching for data access framework.

2011-12-05 Thread Dave Newton
wat On Mon, Dec 5, 2011 at 12:11 PM, Josep García jgar...@isigma.es wrote: Use spring-security. 2011/12/5 Balwinder balwinder@gmail.com 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

Re: [OT] Searching for data access framework.

2011-12-05 Thread Eric Lentz
How about an object factory? Interface - UserAuth Implementation - LdapAuth implements UserAuth Implementation - SqlAuth implements UserAuth Factory (pseudo code): if(ldap) { return(new LdapAuth); } else if(sql) { reutrn(new SqlAuth); } etc. More pseudo code (this is inside your

Re: [OT] Searching for data access framework.

2011-12-05 Thread Balwinder
Thanks Lukasz, this is exactly what I am looking for, hope there will not be any licensing issue if I want to use it. Regards, Balwinder Kumar On 12/5/2011 10:45 PM, Łukasz Lenart wrote: Check JDO http://www.datanucleus.org/products/index.html Regards

Re: [OT] Searching for data access framework.

2011-12-05 Thread Wes Wannemacher
On Mon, Dec 5, 2011 at 12:12 PM, Balwinder balwinder@gmail.com wrote: 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

RE: [OT] Searching for data access framework.

2011-12-05 Thread Marcus Bond
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