[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: White spaces are required between publicId and systemId.

nesyarug do-not-reply at jboss.com
Mon Mar 16 12:33:53 EDT 2009


Sorry, correct applicationContext-hibernate:

<?xml version="1.0" encoding="UTF-8"?>
  | <beans xmlns="http://www.springframework.org/schema/beans"
  | 		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  | 		xmlns:aop="http://www.springframework.org/schema/aop"
  | 		xmlns:tx="http://www.springframework.org/schema/tx"
  | 		xsi:schemaLocation="
  | 			http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  | 			http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
  | 			http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
  |   <!-- ========================= RESOURCE DEFINITIONS ========================= -->
  |   <!-- Configurer that replaces ${...} placeholders with values from a properties file -->
  |   <!-- (in this case, JDBC-related settings for the dataSource definition below) -->
  |   <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
  |     <property name="location" value="/WEB-INF/jdbc.properties" />
  |   </bean>
  |   <!-- Local Apache Commons DBCP DataSource that refers to a combined database -->
  |   <!-- Commons DBCP's BasicDataSource is a full connection pool bean. -->
  |   <!-- The placeholders are resolved from jdbc.properties through -->
  |   <!-- the PropertyPlaceholderConfigurer in applicationContext.xml -->
  |   <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
  |     <property name="driverClassName" value="${jdbc.driverClassName}" />
  |     <property name="url" value="${jdbc.url}" />
  |     <property name="username" value="${jdbc.username}" />
  |     <property name="password" value="${jdbc.password}" />
  |   </bean>
  |   <!-- Hibernate SessionFactory -->
  |   <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  |     <property name="dataSource" ref="dataSource" />
  |     <property name="mappingResources">
  |       <value>omi.hbm.xml</value>
  |     </property>
  |     <property name="hibernateProperties">
  |       <props>
  |         <prop key="hibernate.dialect">${hibernate.dialect}</prop>
  |         <prop key="hibernate.show_sql">true</prop>
  |         <prop key="hibernate.generate_statistics">true</prop>
  |       </props>
  |     </property>
  |     <property name="eventListeners">
  |       <map>
  |         <entry key="merge">
  |           <bean class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener" />
  |         </entry>
  |       </map>
  |     </property>
  |   </bean>
  |   <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
  |   <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
  |     <property name="sessionFactory" ref="sessionFactory" />
  |   </bean>
  |   <!-- Enable the configuration of transactional behavior based on annotations -->
  |   <tx:annotation-driven transaction-manager="transactionManager" />
  |   <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
  |   <!-- 
  |     <bean id="hibernateRepositoryStrategy" class="x.strategy.HibernateRepositoryStrategy">
  |     <property name="sessionFactory" ref="sessionFactory" />
  |     </bean>
  |   -->
  |   <!-- Hibernate 3.0's JMX statistics service -->
  |   <!-- Implements the StatisticsServiceMBean management interface -->
  |   <bean name="possibilium:type=HibernateStatistics" class="org.hibernate.jmx.StatisticsService">
  |     <property name="sessionFactory" ref="sessionFactory" />
  |   </bean>
  |   <!-- ========================= JMX EXPORTER DEFINITION ========================= -->
  |   <!--
  |     - Exporter that exposes Hibernate 3.0's statistics service via JMX.
  |     - Autodetects the statistics service, which is a standard MBean,
  |     - using its bean name as JMX object name.
  |     -
  |     - By default, the standard MBeanServerFactory.findMBeanServer method will be used
  |     - to determine the MBeanServer. Unfortunately, this does not work on WebLogic <= 8.1:
  |     - you need to comment in the WebLogicMBeanServerFactoryBean definition on WebLogic,
  |     - specifying appropriate configuration values there.
  |   -->
  |   <bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter">
  |     <property name="autodetect" value="true" />
  |   </bean>
  |   <!-- ========================= DAO ========================= -->
  |   <!--  Dao Layer generic config-->
  |   <bean id="extendedFinderNamingStrategy" class="x.dao.finder.ExtendedFinderNamingStrategy" />
  |   <bean id="abstractDaoTarget" class="x.dao.GenericDaoHibernateImpl" abstract="true">
  |     <property name="sessionFactory">
  |       <ref bean="sessionFactory" />
  |     </property>
  |     <property name="namingStrategy">
  |       <ref bean="extendedFinderNamingStrategy" />
  |     </property>
  |   </bean>
  |   <bean id="finderIntroductionAdvisor" class="x.dao.finder.FinderIntroductionAdvisor" />
  |   <bean id="abstractDao" class="org.springframework.aop.framework.ProxyFactoryBean" abstract="true">
  |     <property name="interceptorNames">
  |       <list>
  |         <value>finderIntroductionAdvisor</value>
  |       </list>
  |     </property>
  |   </bean>
  |   <!--  Dao Layer instances -->
  |   <bean id="userDao" parent="abstractDao">
  |     <property name="proxyInterfaces">
  |       <value>x.user.IUserDao</value>
  |     </property>
  |     <property name="target">
  |       <bean parent="abstractDaoTarget">
  |         <constructor-arg>
  |           <value>x.user.User</value>
  |         </constructor-arg>
  |       </bean>
  |     </property>
  |   </bean>
  |   <bean id="authorityDao" parent="abstractDao">
  |     <property name="proxyInterfaces">
  |       <value>x.user.IAuthorityDao</value>
  |     </property>
  |     <property name="target">
  |       <bean parent="abstractDaoTarget">
  |         <constructor-arg>
  |           <value>x.user.Authority</value>
  |         </constructor-arg>
  |       </bean>
  |     </property>
  |   </bean>
  | </beans>
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4218384#4218384

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4218384



More information about the jboss-user mailing list