Update of
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources
In directory
sc8-pr-cvs1:/tmp/cvs-serv15794/modules/hibernate/src/xdoclet/modules/hibernate/resources
Modified Files:
hibernate-factory.xdt
Log Message:
Updates for FactoryClass to generate correct code for use with JNDI data sources
Index: hibernate-factory.xdt
===================================================================
RCS file:
/cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/resources/hibernate-factory.xdt,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** hibernate-factory.xdt 6 Dec 2003 01:07:35 -0000 1.5
--- hibernate-factory.xdt 15 Jan 2004 18:39:19 -0000 1.6
***************
*** 40,44 ****
--- 40,49 ----
public static int JNDI_SESSION_FACTORY = 1;
/** This code defaults to using the LOCAL_SESSION_FACTORY unless set differently
at the subtask invocation */
+ <XDtHibernate:ifUseJndiFactory>
+ private static int sessionFactoryType = JNDI_SESSION_FACTORY;
+ </XDtHibernate:ifUseJndiFactory>
+ <XDtHibernate:ifNotUseJndiFactory>
private static int sessionFactoryType = LOCAL_SESSION_FACTORY;
+ </XDtHibernate:ifNotUseJndiFactory>
/**
***************
*** 139,146 ****
--- 144,156 ----
propertyCache = new Properties();
propertyCache.put("hibernate.dialect", "<XDtHibernate:factoryDialect/>");
+ <XDtHibernate:ifUseJndiFactory>
+ propertyCache.put("hibernate.jndi.url", "<XDtHibernate:jndiName/>");
+ </XDtHibernate:ifUseJndiFactory>
+ <XDtHibernate:ifNotUseJndiFactory>
propertyCache.put("hibernate.connection.driver_class",
"<XDtHibernate:factoryDriver/>");
propertyCache.put("hibernate.connection.url",
"<XDtHibernate:factoryDataSource/>");
propertyCache.put("hibernate.connection.username",
"<XDtHibernate:factoryUsername/>");
propertyCache.put("hibernate.connection.password",
"<XDtHibernate:factoryPassword/>");
+ </XDtHibernate:ifNotUseJndiFactory>
}
</XDtHibernate:ifGeneratePropertyCache>
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel