datanucleus / datanucleus-ldap Goto Github PK
View Code? Open in Web Editor NEWDataNucleus support for persistence to LDAP datastores
DataNucleus support for persistence to LDAP datastores
I have a federated environment which contains multiple RDBMS and a LDAP data stores, when I want to load the application I got the InvalidClassMetaDataException for the classes which belong to another RDBMS store.
If a user class has a Calendar field and they create the value while running in UK daylight saving time (BST), this is then stored (as GenerlizedTime). They retrieve the object and it is instantiated in GMT not BST.
An example
Calendar=java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet
=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Isle_of_Man",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/Isle_of_Man,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2012,MONTH=4,WEEK_OF_YEAR=20,WEEK_OF_MONTH=3,DAY_OF_MONTH=16,DAY_OF_YEAR=137,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=11,HOUR_OF_DAY=11,MINUTE=29,SECOND=23,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=3600000]
Stored as generlized time=19700929114620Z
This is then retrieved as generalized time=20120516112923Z
Calendar=java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2012,MONTH=4,WEEK_OF_YEAR=20,WEEK_OF_MONTH=3,DAY_OF_MONTH=16,DAY_OF_YEAR=137,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=3,AM_PM=0,HOUR=11,HOUR_OF_DAY=11,MINUTE=29,SECOND=23,MILLISECOND=0,ZONE_OFFSET=0,DST_OFFSET=0]
The Calendar TypeConverter stored in datanucleus-core ought to do a better job since it does store timezone code in the string.
Dear Author,
Can you please add a example or point us to an example?
Regards,
Pratik Parikh
The LDAP plugin doesn't do things like all other DN store plugins. Instead it ignores nested embedding information, the nesting of column names etc. It should have a StoreEmbeddedFieldManager and FetchEmbeddedFieldManager just like other store plugins have.
This needs replacing so we can clean up code in core
The latest version of (org.datanucleus.store.query.)QueryManager allows storing and retrieval of compiled datastore queries. For example the new RDBMS query mechanism stores its compilation (the SQL, and mapping info for results and parameters) into this cache, and then retrieves it whenever a query needs compiling to check if we already have one compiled for that datastore. Would make sense for the LDAP plugin to make use of this.
What you store in the datastore-specific compilation object is up to you - e.g see the RDBMS case at
http://datanucleus.svn.sourceforge.net/viewvc/datanucleus/platform/store.rdbms/trunk/src/java/org/datanucleus/store/rdbms/query2/RDBMSQueryCompilation.java?revision=4998&view=markup
just cast the object returned by the QueryManager.getDatastoreQueryCompilation method.
Compound Identity should be used to persist object relationships to LDAP hierarchy.
When fetching objects there are too much queries executed, needs some optimization.
Old hierarchical mapping should be deprecated, instead compound identity (NUCLDAP-39) should be used.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.