You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by ma...@apache.org on 2007/04/10 20:24:39 UTC

svn commit: r527235 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java

Author: mamta
Date: Tue Apr 10 11:24:38 2007
New Revision: 527235

URL: http://svn.apache.org/viewvc?view=rev&rev=527235
Log:
Adding comments in GenericLanguageConnectionFactory to reflect the face that BasicDatabase is the first one to create DVF and then it 
sets the locale on the DVF. Later in it's boot code, BasicDatabase creates LanguageConnectionFactory which causes a call to 
GenericLanguageConnectionFactory.boot. When GenericLanguageConnectionFactory asks Monitor to get DVF, Monitor return the already created 
DVF which has the locale set on it. So, although we see Monitor code getting called twice for DVF, the 2nd time around we get the same 
instance that was created by the first call. 


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java?view=diff&rev=527235&r1=527234&r2=527235
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/conn/GenericLanguageConnectionFactory.java Tue Apr 10 11:24:38 2007
@@ -304,6 +304,10 @@
 	public void boot(boolean create, Properties startParams) 
 		throws StandardException {
 
+		//The following call to Monitor to get DVF is going to get the already
+		//booted DVF (DVF got booted by BasicDatabase's boot method. 
+		//BasicDatabase also set the correct Locale in the DVF. There after,
+		//DVF with correct Locale is available to rest of the Derby code.
 		dvf = (DataValueFactory) Monitor.bootServiceModule(create, this, org.apache.derby.iapi.reference.ClassName.DataValueFactory, startParams);
 		javaFactory = (JavaFactory) Monitor.startSystemModule(org.apache.derby.iapi.reference.Module.JavaFactory);
 		uuidFactory = Monitor.getMonitor().getUUIDFactory();