2007年9月21日金曜日

Hibernate, SpringFramework 主要コンポーネント

org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.ContextLoader
/**
* Instantiate the root WebApplicationContext for this loader, either the
* default context class or a custom context class if specified.
*

This implementation expects custom contexts to implement
* ConfigurableWebApplicationContext. Can be overridden in subclasses.
* @param servletContext current servlet context
* @param parent the parent ApplicationContext to use, or null if none
* @return the root WebApplicationContext
* @throws BeansException if the context couldn't be initialized
* @see ConfigurableWebApplicationContext
*/
protected WebApplicationContext createWebApplicationContext(
ServletContext servletContext, ApplicationContext parent) throws BeansException {

Class contextClass = determineContextClass(servletContext);
if (!ConfigurableWebApplicationContext.class.isAssignableFrom(contextClass)) {
throw new ApplicationContextException("Custom context class [" + contextClass.getName() +
"] is not of type [" + ConfigurableWebApplicationContext.class.getName() + "]");
}

ConfigurableWebApplicationContext wac =
(ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass);
wac.setParent(parent);
wac.setServletContext(servletContext);
String configLocation = servletContext.getInitParameter(CONFIG_LOCATION_PARAM);
if (configLocation != null) {
wac.setConfigLocations(StringUtils.tokenizeToStringArray(configLocation,
ConfigurableWebApplicationContext.CONFIG_LOCATION_DELIMITERS));
}

wac.refresh();
return wac;

}

org.springframework.web.context.support.WebApplicationContextUtils
org.springframework.orm.hibernate3.LocalSessionFactoryBean
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.springframework.orm.hibernate3.HibernateTemplate
org.springframework.orm.hibernate3.HibernateCallback
org.springframework.jdbc.support.incrementer.OracleSequenceMaxValueIncrementer

org.hibernate.cfg.Configuration
org.hibernate.SessionFactory
org.hibernate.Session
org.hibernate.Query
org.hibernate.Criteria
org.hibernate.criterion.Restrictions
org.hibernate.criterion.Subqueries
org.hibernate.dialect.MySQLDialect

mapping file

5.1.4.4. Identity columns and sequences

For databases which support identity columns (DB2, MySQL, Sybase, MS SQL), you may use identity key generation. For databases that support sequences (DB2, Oracle, PostgreSQL, Interbase, McKoi, SAP DB) you may use sequence style key generation. Both these strategies require two SQL queries to insert a new object.

[Struts]nested property への access
org.apache.commons.beanutils.BeanUtilsBean#setProperty()
ex)
struts-examples\validator\jsRegistration.jsp(71,28)
struts-examples\validator\multiRegistration2.jsp(47,28)
struts-examples\validator\registration.jsp(72,28)