Hi Jacob, it´s wonderful,
my infrastructure is almost identical.
I wanted to use the versions of the most recent products
I have done this:
I tried with declaring a TransactionManager of type JTA, but it removed
problems with JBoss, due to a ClassCastException, then proving I tried with
the TransactionManager of Hibernate, and it sent an error from the loader of
classes.
As much I read in Internet that I did not find a route makes specific and I
decided that it would only deploy it first in a Tomcat. Nevertheless it is
necessary to put it to work in JBoss.
An additional question to everything, Which TransactionManager is more
recommendable: the JTA (that it would delegate in JBoss, according to I
understand), or the one of Hibernate?
My web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!-- generated by Spindle, http://spindle.sourceforge.net -->
<!-- Este archivo es una plantilla para generar el descriptor de aplicacion
de Tapestry. Modificar con cuidado. -hrojas -->
<web-app>
<display-name>APPLICATION_NAME</display-name>
<distributable/>
<filter>
<filter-name>redirect</filter-name>
<filter-class>org.apache.tapestry.RedirectFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>redirect</filter-name>
<url-pattern>/</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>APPLICATION_NAME</servlet-name>
<servlet-class>org.apache.tapestry.ApplicationServlet
</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>APPLICATION_NAME</servlet-name>
<url-pattern>/app</url-pattern>
</servlet-mapping>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/AMV-demo-servlet.xml</param-value>
</context-param>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
and until now i´m proving this descriptor of spring, i believe that it lack
the bean transactionManager:
<beans>
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.Oracle9Dialect</prop>
</props>
</property>
<property name="configLocation">
<value>/WEB-INF/hibernate.cfg.xml</value>
</property>
<property name="mappingResources">
<list>
<value>Usuario.hbm.xml</value>
<value>Departamento.hbm.xml</value>
<value>Municipio.hbm.xml</value>
<value>Pais.hbm.xml</value>
<value>Persona.hbm.xml</value>
</list>
</property>
</bean>
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource
">
<property name="driverClassName">
<value>oracle.jdbc.driver.OracleDriver</value>
</property>
<property name="url">
<value>jdbc:oracle:thin:@192.168.0.3:1521:matri</value>
</property>
<property name="username">
<value>amv</value>
</property>
<property name="password">
<value>amv</value>
</property>
</bean>
<bean id="personasDao"
class="com.edesa.amv.dao.PersonasDao">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="departamentosDao"
class="com.edesa.amv.dao.DepartamentosDao">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="municipiosDao"
class="com.edesa.amv.dao.MunicipiosDao">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
<bean id="paisesDao"
class="com.edesa.amv.dao.PaisesDao">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
</beans>
/*******************************************************************************************/
thanks for any aid friend, how you see it?
On 6/1/07, Jacob Bergoo <[EMAIL PROTECTED]> wrote:
Hi Cesar,
I am working with Tapestry 4.0.2, Spring 2.0.5 Hibernate 3.2 and JBoss
4.0.4
GA, Acegi 1.0.3
I am happy to answer any questions you have on how we did our
configuration...
Jacob
César Augusto Mateus wrote:
>
> Hi all, I´m beginning with Tapestry 4.0
> Now i´m developing a project in my work, and i decided for these
> technologies.
> I have experience in Tapestry 3, hibernate 3.0, and JBoss or OC4J;
> I wanted to know how if somebody has a similar example or experience
> developing something similar, to receive some advice.
> I have found in Internet several forms of configuration of spring with
> tapestry but not as it works well. Some ways are programmatic, and
others
> are declaratory by means of web.xml and applicationcontext.xml.
> I have been proving a way in which web.xml was not touched, but that was
> enough with applicationContext.xml, but there were problems when
> integrating
> with jboss due to the transactions. I am trying of the way that is seen
in
>
http://www.springframework.org/docs/reference/webintegration.html#view-tapestry
> Thanks for any aid...
>
>
--
View this message in context:
http://www.nabble.com/Integration-Tapestry-4.0-%2B-Spring-2.0-%2B-Hibernate-3.0-%2B-JBoss-4.2-tf3849055.html#a10913113
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]