Update of /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate In directory sc8-pr-cvs1:/tmp/cvs-serv11732/modules/hibernate/src/xdoclet/modules/hibernate
Modified Files: HibernateTagsHandler.java JBossServiceSubTask.java XDocletModulesHibernateMessages.java Log Message: finished samples & hibernate service descriptor generation improved xdoclet exception generation - do not swallow catched exception, log it in the message Index: HibernateTagsHandler.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/HibernateTagsHandler.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** HibernateTagsHandler.java 12 Dec 2002 10:06:28 -0000 1.2 --- HibernateTagsHandler.java 12 Dec 2002 18:27:56 -0000 1.3 *************** *** 82,85 **** --- 82,110 ---- /** + * SQL dialect extractor + * + * @return + * @exception XDocletException + * @doc.tag type="content" + */ + + public String dialect() throws XDocletException + { + return getJBossServiceSubTask().getDialect(); + } + + /** + * data source JNDI Name extractor + * + * @return + * @exception XDocletException + * @doc.tag type="content" + */ + public String dataSource() throws XDocletException + { + return getJBossServiceSubTask().getDataSource(); + } + + /** * comma separated list of hibernate mappings * Index: JBossServiceSubTask.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/JBossServiceSubTask.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** JBossServiceSubTask.java 12 Dec 2002 10:06:28 -0000 1.2 --- JBossServiceSubTask.java 12 Dec 2002 18:27:56 -0000 1.3 *************** *** 24,28 **** * name of <tt>Dialect</tt> subclass" * @ant.attribute name="jndiname" description="JNDI name to bind to the <tt>SessionFactory</tt> " required="Yes." ! * @ant.attribute name="transactionstrategy" description="Define transaction strategy" required="Yes." */ public class JBossServiceSubTask --- 24,35 ---- * name of <tt>Dialect</tt> subclass" * @ant.attribute name="jndiname" description="JNDI name to bind to the <tt>SessionFactory</tt> " required="Yes." ! * @ant.attribute name="useouterjoin" description="Whether to use outer join" required="no. default is false" ! * @ant.attribute name="showsql" description="Log sql statemets" required="no. default is false" ! * @ant.attribute name="usertransactionname" description="The JNDI name of the JTA UserTransaction object (used only ! * be <tt>JTATransaction</tt> )" required="no." ! * @ant.attribute name="transactionstrategy" description="The fully qualified class name of the Hibernate <tt> ! * TransactionFactory</tt> implementation" required="no." ! * @ant.attribute name="transactionmanagerlookup" description="strategy for obtaining the JTA <tt>TransactionManager ! * </tt>" required="no." */ public class JBossServiceSubTask *************** *** 44,47 **** --- 51,62 ---- private String _dialect = null; private String _serviceName = null; + private boolean _useOuterJoin = false; + private boolean _showSql = false; + private String _userName = null; + private String _password = null; + private String _userTransactionName = null; + private String _transactionStrategy = null; + + private String _transactionManagerStrategy = null; /** *************** *** 50,53 **** --- 65,69 ---- public JBossServiceSubTask() { + setSubTaskName("jbossservice"); setHavingClassTag("hibernate.class"); setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE)); *************** *** 55,58 **** --- 71,109 ---- } + public String getTransactionManagerStrategy() + { + return _transactionManagerStrategy; + } + + public String getUserTransactionName() + { + return _userTransactionName; + } + + public String getTransactionStrategy() + { + return _transactionStrategy; + } + + public String getUserName() + { + return _userName; + } + + public String getPassword() + { + return _password; + } + + public boolean getUseOuterJoin() + { + return _useOuterJoin; + } + + public boolean getShowSql() + { + return _showSql; + } + /** * return configured service name *************** *** 80,83 **** --- 131,169 ---- } + public void setTransactionManagerStrategy(String transactionManagerStrategy) + { + _transactionManagerStrategy = transactionManagerStrategy; + } + + public void setUserTransactionName(String userTransactionName) + { + _userTransactionName = userTransactionName; + } + + public void setTransactionStrategy(String transactionStrategy) + { + _transactionStrategy = transactionStrategy; + } + + public void setUserName(String userName) + { + _userName = userName; + } + + public void setPassword(String password) + { + _password = password; + } + + public void setUseOuterJoin(boolean useOuterJoin) + { + _useOuterJoin = useOuterJoin; + } + + public void setShowSql(boolean showSql) + { + _showSql = showSql; + } + public void setServiceName(String serviceName) { *************** *** 112,115 **** --- 198,210 ---- throw new XDocletException(Translator.getString(XDocletModulesHibernateMessages.class, XDocletModulesHibernateMessages.SERVICE_NAME_REQUIRED)); + } + + if (getDialect() == null) { + throw new +XDocletException(Translator.getString(XDocletModulesHibernateMessages.class, + XDocletModulesHibernateMessages.SQL_DIALECT_REQUIRED)); + } + if (getDataSource() == null) { + throw new +XDocletException(Translator.getString(XDocletModulesHibernateMessages.class, + XDocletModulesHibernateMessages.DATA_SOURCE_REQUIRED)); } } Index: XDocletModulesHibernateMessages.java =================================================================== RCS file: /cvsroot/xdoclet/xdoclet/modules/hibernate/src/xdoclet/modules/hibernate/XDocletModulesHibernateMessages.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** XDocletModulesHibernateMessages.java 12 Dec 2002 10:06:28 -0000 1.3 --- XDocletModulesHibernateMessages.java 12 Dec 2002 18:27:56 -0000 1.4 *************** *** 34,39 **** /** * @msg.bundle msg="Service name is required for jboss service" ! * @msg.bundle msg="Bigge geben Sie die Servicename ein" language="de" */ public final static String SERVICE_NAME_REQUIRED = "SERVICE_NAME_REQUIRED"; } --- 34,49 ---- /** * @msg.bundle msg="Service name is required for jboss service" ! * @msg.bundle msg="Servicename wird benotigt" language="de" */ public final static String SERVICE_NAME_REQUIRED = "SERVICE_NAME_REQUIRED"; + /** + * @msg.bundle msg="SQL Dialect is required for jboss service" + * @msg.bundle msg="SQL Dialect wird benötigt" language="de" + */ + public final static String SQL_DIALECT_REQUIRED = "SQL_DIALECT_REQUIRED"; + /** + * @msg.bundle msg="Data source name is required for jboss service" + * @msg.bundle msg="Datenquelle name wird benötigt" language="de" + */ + public final static String DATA_SOURCE_REQUIRED = "DATA_SOURCE_REQUIRED"; } ------------------------------------------------------- This sf.net email is sponsored by: With Great Power, Comes Great Responsibility Learn to use your power at OSDN's High Performance Computing Channel http://hpc.devchannel.org/ _______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel