You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by César Augusto Mateus <ce...@gmail.com> on 2007/05/31 23:36:33 UTC

Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

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...

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by alvaro tovar <al...@gmail.com>.
hi, i don't know but look

http://wiki.apache.org/tapestry/Tapestry4Spring
http://howardlewisship.com/tapestry-javaforge/tapestry-spring/



alvaro

On 5/31/07, César Augusto Mateus < cesar.mateus@gmail.com> 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...
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
Good Morning, I have a GridComponent question similar to this:
' Hi Jesse,
I looked at the link and I must say that I still do not get it....
How will I wrap my content into a directLink in the grid component? '

I find this question in this url searching information over this:
http://www.sagewire.org/tapestry-java/Grid-Component-question-1171616.aspx

somebody resolve this topic??
thanks for your help!!

And another question, the parameter gridData is a Collection, this
collection is loaded in memory??, as well, if the collection have a size of
a millions of objects, all will be loaded in memory?

On 6/6/07, César Augusto Mateus <ce...@gmail.com> wrote:
>
> Thank you very much, i very was disoriented
> I put the sitemap.xml inside the folder META-INF in a jar of the library
> tacos, this jar have a file there same named tacos.services.xml, where are
> especified the services hivemind of the library Tacos.
>
> On 6/5/07, andyhot <an...@di.uoa.gr> wrote:
> >
> > Doesn't your app use a hivemodule.xml?
> > See http://tapestry.apache.org/tapestry4.1/usersguide/hivemind.html on
> > where to add this...
> >
> > You then have to place the sitemap.xml file at the same location, and
> > then do the modifications
> > described at http://tacos.sourceforge.net/hivemind/SiteMap.html
> >
> > César Augusto Mateus wrote:
> > > Good afternoon,
> > > I have a problem configuring the library tacos with spring in my
> > > environment.
> > > Perhaps you are using this library.
> > > How integrate the descriptor of Spring with the service-point of
> > tacos.
> > > I'm trying this: there is a hivemodule.xml in the folder META_INF of
> > > the jar
> > > tapestry-spring-1.0.0.jar
> > > According to http://tacos.sourceforge.net/hivemind/SiteMap.html a way
> > of
> > > begin is enabling the service SiteMap of the library Tacos, but this
> > > have a
> > > hivemodule.xml file also.
> > > I´m proving put the service-point in the file hivemodule.xml of the
> > jar
> > > tapestry-spring-1.0.0.jar.
> > > If you know a indication would be very appreciated.
> > >
> > >
> > > On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
> > >>
> > >>
> > >> No problem,
> > >> if you have any other questions just feel free to ask...
> > >>
> > >> Cheers,
> > >> Jacob
> > >>
> > >>
> > >> César Augusto Mateus wrote:
> > >> >
> > >> > thank you very much Jacob, your help has been very valuable!!!
> > >> >
> > >> > On 6/4/07, Jacob Bergoo <jacob.bergoo@gmail.com > wrote:
> > >> >>
> > >> >>
> > >> >> Hi Cesar,
> > >> >>
> > >> >> the datasource is defined in the web.xml:
> > >> >>
> > >> >> <!--
> > >> >> =========================== DATASOURCE
> > >> >> ==========================================================
> > >> >> -->
> > >> >>
> > >> >>         <resource-ref>
> > >> >>                 <res-ref-name>OracleDS</res-ref-name>
> > >> >>                 <res-type>javax.sql.DataSource</res-type>
> > >> >>                 <res-auth>Container</res-auth>
> > >> >>         </resource-ref>
> > >> >>
> > >> >>
> > >> >> we tie everything togeather in jboss_service.xml:
> > >> >>
> > >> >> <?xml version=" 1.0" encoding="UTF-8"?>
> > >> >>
> > >> >> <server>
> > >> >>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
> > >> >> name=" jboss.har:service=Hibernate">
> > >> >>                 <attribute
> > >> >> name="DatasourceName">java:OracleDS</attribute>
> > >> >>                 <attribute
> > >> >>
> > >> >>
> > >>
> > name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
> > >>
> > >> >>                 <attribute name="Dialect">
> > >> >> org.hibernate.dialect.OracleDialect</attribute>
> > >> >>                 <attribute name="CacheProviderClass">
> > >> >>                         org.hibernate.cache.HashtableCacheProvider
> > >> >>                 </attribute>
> > >> >>         </mbean>
> > >> >> </server>
> > >> >>
> > >> >> sorry if I confused you... I forgot to post that one..
> > >> >> Hope it helps,
> > >> >> Jacob
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >> César Augusto Mateus wrote:
> > >> >> >
> > >> >> > Hi Jacob, a question perhaps some foo:
> > >> >> >
> > >> >> > You construct a bean sessionFactory with
> > >> >> > org.springframework.jndi.JndiObjectFactoryBean ,
> > >> >> > in addition your bean dataSource is also a
> > >> >> > org.springframework.jndi.JndiObjectFactoryBean.
> > >> >> >
> > >> >> > My question is: it needs from bean sessionFactory the
> > specification
> > >> of
> > >> >> a
> > >> >> > datasource, generally this datasourse is other bean, but in your
> > >> case
> > >> >> the
> > >> >> > bean dataSource is not referenced from the bean sessionFactory.
> > >> >> >
> > >> >> > you would explain to me bean InvestacorpSessionFactory?
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> >
> > >> >> > On 6/1/07, Jacob Bergoo < jacob.bergoo@gmail.com> wrote:
> > >> >> >>
> > >> >> >>
> > >> >> >> Ci Cesar,
> > >> >> >>
> > >> >> >> I am using the JTA Transaction Manager. For me that was easier
> > to
> > >> use
> > >> >> >> JBoss
> > >> >> >> JTA then to try to turn it of and instead use the one Hibernate
> > is
> > >> >> >> providing. I am not an expert on the Transaction Manager, but I
> >
> > >> assume
> > >> >> >> that
> > >> >> >> they are pritty much the same.
> > >> >> >>
> > >> >> >> In my applicationContaxt-persistence.xml I have this:
> > >> >> >>
> > >> >> >>
> > >> >> >> <?xml version="1.0" encoding="UTF-8"?>
> > >> >> >> <beans xmlns=" http://www.springframework.org/schema/beans"
> > >> >> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >> >> >>        xsi:schemaLocation="
> > >> >> >> http://www.springframework.org/schema/beans
> > >> >> >>
> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> > >> >> >>
> > >> >> >>         <!-- DATASOURCE -->
> > >> >> >>
> > >> >> >>         <bean id="dataSource"
> > >> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> > >> >> >>                 <property name="jndiName">
> > >> >> >>                         <value>java:OracleDS</value>
> > >> >> >>                 </property>
> > >> >> >>         </bean>
> > >> >> >>
> > >> >> >>         <!-- TRANSACTIONS -->
> > >> >> >>
> > >> >> >>         <bean id="transactionManager"
> > >> >> >> class="
> > org.springframework.transaction.jta.JtaTransactionManager">
> > >> >> >>                 <property name="transactionManagerName"
> > >> >> >> value="java:/TransactionManager"></property>
> > >> >> >>                 <property name="userTransactionName"
> > >> >> >> value="UserTransaction"></property>
> > >> >> >>         </bean>
> > >> >> >>
> > >> >> >>         <bean id="sessionFactory"
> > >> >> >> class="org.springframework.jndi.JndiObjectFactoryBean ">
> > >> >> >>                 <property name="jndiName">
> > >> >> >>
> > >> >> >>
> > >> >> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
> > >> >> >>                 </property>
> > >> >> >>         </bean>
> > >> >> >>
> > >> >> >>         <bean id="hibernateTemplate"
> > >> >> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
> > >> >> >>                 <property name="sessionFactory">
> > >> >> >>                         <ref bean="sessionFactory"/>
> > >> >> >>                 </property>
> > >> >> >>         </bean>
> > >> >> >>
> > >> >> >>         <!-- BEAN MAPPING -->
> > >> >> >>        <bean id="somePojoDao"
> > >> >> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
> > >> >> >>                 <property name="hibernateTemplate">
> > >> >> >>                         <ref bean="hibernateTemplate"/>
> > >> >> >>                 </property>
> > >> >> >>         </bean>
> > >> >> >>
> > >> >> >>         ......
> > >> >> >>
> > >> >> >>
> > >> >> >> </beans>
> > >> >> >>
> > >> >> >> and my web.xml look like this:
> > >> >> >>
> > >> >> >> <?xml version=" 1.0" encoding="UTF-8"?>
> > >> >> >> <web-app id="Investacorp" version="2.4"
> > >> >> >>         xmlns=" http://java.sun.com/xml/ns/j2ee"
> > >> >> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >> >> >>         xsi:schemaLocation="
> > >> >> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> > >> >> >>
> > >> >> >>         <!-- WebApp_ID -->
> > >> >> >>         <display-name>MyCompany</display-name>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> ================================= SESSION TIME
> > >> >> >> ================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <session-config>
> > >> >> >>                 <session-timeout>1200</session-timeout>
> > >> >> >>         </session-config>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> ================================= WELCOME FILE
> > >> >> >> =================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>
> > >> >> >>         <welcome-file-list>
> > >> >> >>                 <welcome-file> index.html</welcome-file>
> > >> >> >>                 <welcome-file>index.jsp</welcome-file>
> > >> >> >>         </welcome-file-list>
> > >> >> >>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> ================================= ERROR PAGE
> > >> >> >> ===================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <!-- Predefined Error page if runtime exceptions occur.
> > >> Toggle
> > >> >> >> during
> > >> >> >> debugging  -->
> > >> >> >>         <error-page>
> > >> >> >>                 <exception-type>java.lang.RuntimeException
> > >> >> >> </exception-type>
> > >> >> >>                 <location>/CustomExceptionPage.html</location>
> > >> >> >>         </error-page>
> > >> >> >>
> > >> >> >>         <error-page>
> > >> >> >>                 <error-code>403</error-code>
> > >> >> >>                 <location>/AccessDeniedPage.html</location>
> > >> >> >>         </error-page>
> > >> >> >>
> > >> >> >>         <error-page>
> > >> >> >>                 <error-code>404</error-code>
> > >> >> >>                 <location>/CustomExceptionPage.html</location>
> > >> >> >>         </error-page>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> =========================== DATASOURCE
> > >> >> >> ==========================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <resource-ref>
> > >> >> >>                 <res-ref-name>OracleDS</res-ref-name>
> > >> >> >>                 <res-type>javax.sql.DataSource</res-type>
> > >> >> >>                 <res-auth>Container</res-auth>
> > >> >> >>         </resource-ref>
> > >> >> >>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> =========================== LISTENER
> > >> >> >> ==========================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <listener>
> > >> >> >>
> > >> >> >> <listener-class>
> > >> org.springframework.web.context.ContextLoaderListener
> > >> >> >> </listener-class>
> > >> >> >>         </listener>
> > >> >> >>
> > >> >> >>         <context-param>
> > >> >> >>             <param-name>contextConfigLocation</param-name>
> > >> >> >>
> > >> >> <param-value>/WEB-INF/applicationContext*.xml</param-value>
> > >> >> >>         </context-param>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> =========================== MVC APPLICATION CONTROLLER
> > >> >> >> ==========================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <servlet>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>
> > >> >> >> <servlet-class> org.apache.tapestry.ApplicationServlet
> > >> </servlet-class>
> > >> >> >>         <load-on-startup>0</load-on-startup>
> > >> >> >>         </servlet>
> > >> >> >>
> > >> >> >>         <!-- Servlet Mapping for Acegi Security Framework to
> > work
> > >> with
> > >> >> >> Tapestry -->
> > >> >> >>
> > >> >> >>     <servlet-mapping>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>         <url-pattern>/index.html</url-pattern>
> > >> >> >>     </servlet-mapping>
> > >> >> >>
> > >> >> >>     <servlet-mapping>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>         <url-pattern>*.html</url-pattern>
> > >> >> >>     </servlet-mapping>
> > >> >> >>
> > >> >> >>     <servlet-mapping>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>         <url-pattern>*.direct</url-pattern>
> > >> >> >>     </servlet-mapping>
> > >> >> >>     <servlet-mapping>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>         <url-pattern>*.sdirect</url-pattern>
> > >> >> >>     </servlet-mapping>
> > >> >> >>     <servlet-mapping>
> > >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> > >> >> >>         <url-pattern>*.svc</url-pattern>
> > >> >> >>     </servlet-mapping>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >> =========================== SECURING HTML AND PAGE FILES
> > >> >> >> ========================================================
> > >> >> >> -->
> > >> >> >>
> > >> >> >>         <security-constraint>
> > >> >> >>                 <display-name>Prevent access to raw *.html,
> > *.css,
> > >> >> >> *.page,
> > >> >> >> *.js
> > >> >> >> files.</display-name>
> > >> >> >>                 <web-resource-collection>
> > >> >> >>                         <web-resource-name>Tapestry
> > >> >> >> Pages</web-resource-name>
> > >> >> >>                         <url-pattern>/html/*</url-pattern>
> > >> >> >>                 </web-resource-collection>
> > >> >> >>                 <auth-constraint>
> > >> >> >>                         <description>No roles, so no direct
> > >> >> >> access</description>
> > >> >> >>                 </auth-constraint>
> > >> >> >>         </security-constraint>
> > >> >> >>
> > >> >> >> <!--
> > >> >> >>
> > >> >> >>
> > >> >>
> > >>
> > =================================================================================================
> >
> > >>
> > >> >> >> -->
> > >> >> >>
> > >> >> >> </web-app>
> > >> >> >>
> > >> >> >> If you have any more questions just feel free to ask...
> > >> >> >>
> > >> >> >> Cheers,
> > >> >> >> Jacob
> > >> >> >> --
> > >> >> >> 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#a10915784
> >
> > >>
> > >> >> >> Sent from the Tapestry - User mailing list archive at
> > Nabble.com.
> > >> >> >>
> > >> >> >>
> > >> >> >>
> > >> ---------------------------------------------------------------------
> > >> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >> >> >>
> > >> >> >>
> > >> >> >
> > >> >> >
> > >> >>
> > >> >> --
> > >> >> 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#a10954827
> > >>
> > >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >> >>
> > >> >>
> > >> >>
> > ---------------------------------------------------------------------
> > >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >>
> > >> --
> > >> 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#a10955847
> > >>
> > >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > >> For additional commands, e-mail: users-help@tapestry.apache.org
> > >>
> > >>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
Thank you very much, i very was disoriented
I put the sitemap.xml inside the folder META-INF in a jar of the library
tacos, this jar have a file there same named tacos.services.xml, where are
especified the services hivemind of the library Tacos.

On 6/5/07, andyhot <an...@di.uoa.gr> wrote:
>
> Doesn't your app use a hivemodule.xml?
> See http://tapestry.apache.org/tapestry4.1/usersguide/hivemind.html on
> where to add this...
>
> You then have to place the sitemap.xml file at the same location, and
> then do the modifications
> described at http://tacos.sourceforge.net/hivemind/SiteMap.html
>
> César Augusto Mateus wrote:
> > Good afternoon,
> > I have a problem configuring the library tacos with spring in my
> > environment.
> > Perhaps you are using this library.
> > How integrate the descriptor of Spring with the service-point of tacos.
> > I'm trying this: there is a hivemodule.xml in the folder META_INF of
> > the jar
> > tapestry-spring-1.0.0.jar
> > According to http://tacos.sourceforge.net/hivemind/SiteMap.html a way of
> > begin is enabling the service SiteMap of the library Tacos, but this
> > have a
> > hivemodule.xml file also.
> > I´m proving put the service-point in the file hivemodule.xml of the jar
> > tapestry-spring-1.0.0.jar.
> > If you know a indication would be very appreciated.
> >
> >
> > On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >>
> >>
> >> No problem,
> >> if you have any other questions just feel free to ask...
> >>
> >> Cheers,
> >> Jacob
> >>
> >>
> >> César Augusto Mateus wrote:
> >> >
> >> > thank you very much Jacob, your help has been very valuable!!!
> >> >
> >> > On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >> >>
> >> >>
> >> >> Hi Cesar,
> >> >>
> >> >> the datasource is defined in the web.xml:
> >> >>
> >> >> <!--
> >> >> =========================== DATASOURCE
> >> >> ==========================================================
> >> >> -->
> >> >>
> >> >>         <resource-ref>
> >> >>                 <res-ref-name>OracleDS</res-ref-name>
> >> >>                 <res-type>javax.sql.DataSource</res-type>
> >> >>                 <res-auth>Container</res-auth>
> >> >>         </resource-ref>
> >> >>
> >> >>
> >> >> we tie everything togeather in jboss_service.xml:
> >> >>
> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >>
> >> >> <server>
> >> >>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
> >> >> name="jboss.har:service=Hibernate">
> >> >>                 <attribute
> >> >> name="DatasourceName">java:OracleDS</attribute>
> >> >>                 <attribute
> >> >>
> >> >>
> >>
> name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
> >>
> >> >>                 <attribute name="Dialect">
> >> >> org.hibernate.dialect.OracleDialect</attribute>
> >> >>                 <attribute name="CacheProviderClass">
> >> >>                         org.hibernate.cache.HashtableCacheProvider
> >> >>                 </attribute>
> >> >>         </mbean>
> >> >> </server>
> >> >>
> >> >> sorry if I confused you... I forgot to post that one..
> >> >> Hope it helps,
> >> >> Jacob
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> César Augusto Mateus wrote:
> >> >> >
> >> >> > Hi Jacob, a question perhaps some foo:
> >> >> >
> >> >> > You construct a bean sessionFactory with
> >> >> > org.springframework.jndi.JndiObjectFactoryBean,
> >> >> > in addition your bean dataSource is also a
> >> >> > org.springframework.jndi.JndiObjectFactoryBean.
> >> >> >
> >> >> > My question is: it needs from bean sessionFactory the
> specification
> >> of
> >> >> a
> >> >> > datasource, generally this datasourse is other bean, but in your
> >> case
> >> >> the
> >> >> > bean dataSource is not referenced from the bean sessionFactory.
> >> >> >
> >> >> > you would explain to me bean InvestacorpSessionFactory?
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >> >> >>
> >> >> >>
> >> >> >> Ci Cesar,
> >> >> >>
> >> >> >> I am using the JTA Transaction Manager. For me that was easier to
> >> use
> >> >> >> JBoss
> >> >> >> JTA then to try to turn it of and instead use the one Hibernate
> is
> >> >> >> providing. I am not an expert on the Transaction Manager, but I
> >> assume
> >> >> >> that
> >> >> >> they are pritty much the same.
> >> >> >>
> >> >> >> In my applicationContaxt-persistence.xml I have this:
> >> >> >>
> >> >> >>
> >> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >> >> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >> >>        xsi:schemaLocation="
> >> >> >> http://www.springframework.org/schema/beans
> >> >> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> ">
> >> >> >>
> >> >> >>         <!-- DATASOURCE -->
> >> >> >>
> >> >> >>         <bean id="dataSource"
> >> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >> >> >>                 <property name="jndiName">
> >> >> >>                         <value>java:OracleDS</value>
> >> >> >>                 </property>
> >> >> >>         </bean>
> >> >> >>
> >> >> >>         <!-- TRANSACTIONS -->
> >> >> >>
> >> >> >>         <bean id="transactionManager"
> >> >> >> class="org.springframework.transaction.jta.JtaTransactionManager
> ">
> >> >> >>                 <property name="transactionManagerName"
> >> >> >> value="java:/TransactionManager"></property>
> >> >> >>                 <property name="userTransactionName"
> >> >> >> value="UserTransaction"></property>
> >> >> >>         </bean>
> >> >> >>
> >> >> >>         <bean id="sessionFactory"
> >> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >> >> >>                 <property name="jndiName">
> >> >> >>
> >> >> >>
> >> >> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
> >> >> >>                 </property>
> >> >> >>         </bean>
> >> >> >>
> >> >> >>         <bean id="hibernateTemplate"
> >> >> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
> >> >> >>                 <property name="sessionFactory">
> >> >> >>                         <ref bean="sessionFactory"/>
> >> >> >>                 </property>
> >> >> >>         </bean>
> >> >> >>
> >> >> >>         <!-- BEAN MAPPING -->
> >> >> >>        <bean id="somePojoDao"
> >> >> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
> >> >> >>                 <property name="hibernateTemplate">
> >> >> >>                         <ref bean="hibernateTemplate"/>
> >> >> >>                 </property>
> >> >> >>         </bean>
> >> >> >>
> >> >> >>         ......
> >> >> >>
> >> >> >>
> >> >> >> </beans>
> >> >> >>
> >> >> >> and my web.xml look like this:
> >> >> >>
> >> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >> >> <web-app id="Investacorp" version="2.4"
> >> >> >>         xmlns="http://java.sun.com/xml/ns/j2ee"
> >> >> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >> >>         xsi:schemaLocation="
> >> >> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> >> >> >>
> >> >> >>         <!-- WebApp_ID -->
> >> >> >>         <display-name>MyCompany</display-name>
> >> >> >>
> >> >> >> <!--
> >> >> >> ================================= SESSION TIME
> >> >> >> ================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <session-config>
> >> >> >>                 <session-timeout>1200</session-timeout>
> >> >> >>         </session-config>
> >> >> >>
> >> >> >> <!--
> >> >> >> ================================= WELCOME FILE
> >> >> >> =================================================
> >> >> >> -->
> >> >> >>
> >> >> >>
> >> >> >>         <welcome-file-list>
> >> >> >>                 <welcome-file>index.html</welcome-file>
> >> >> >>                 <welcome-file>index.jsp</welcome-file>
> >> >> >>         </welcome-file-list>
> >> >> >>
> >> >> >>
> >> >> >> <!--
> >> >> >> ================================= ERROR PAGE
> >> >> >> ===================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <!-- Predefined Error page if runtime exceptions occur.
> >> Toggle
> >> >> >> during
> >> >> >> debugging  -->
> >> >> >>         <error-page>
> >> >> >>                 <exception-type>java.lang.RuntimeException
> >> >> >> </exception-type>
> >> >> >>                 <location>/CustomExceptionPage.html</location>
> >> >> >>         </error-page>
> >> >> >>
> >> >> >>         <error-page>
> >> >> >>                 <error-code>403</error-code>
> >> >> >>                 <location>/AccessDeniedPage.html</location>
> >> >> >>         </error-page>
> >> >> >>
> >> >> >>         <error-page>
> >> >> >>                 <error-code>404</error-code>
> >> >> >>                 <location>/CustomExceptionPage.html</location>
> >> >> >>         </error-page>
> >> >> >>
> >> >> >> <!--
> >> >> >> =========================== DATASOURCE
> >> >> >> ==========================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <resource-ref>
> >> >> >>                 <res-ref-name>OracleDS</res-ref-name>
> >> >> >>                 <res-type>javax.sql.DataSource</res-type>
> >> >> >>                 <res-auth>Container</res-auth>
> >> >> >>         </resource-ref>
> >> >> >>
> >> >> >>
> >> >> >> <!--
> >> >> >> =========================== LISTENER
> >> >> >> ==========================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <listener>
> >> >> >>
> >> >> >> <listener-class>
> >> org.springframework.web.context.ContextLoaderListener
> >> >> >> </listener-class>
> >> >> >>         </listener>
> >> >> >>
> >> >> >>         <context-param>
> >> >> >>             <param-name>contextConfigLocation</param-name>
> >> >> >>
> >> >> <param-value>/WEB-INF/applicationContext*.xml</param-value>
> >> >> >>         </context-param>
> >> >> >>
> >> >> >> <!--
> >> >> >> =========================== MVC APPLICATION CONTROLLER
> >> >> >> ==========================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <servlet>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>
> >> >> >> <servlet-class>org.apache.tapestry.ApplicationServlet
> >> </servlet-class>
> >> >> >>         <load-on-startup>0</load-on-startup>
> >> >> >>         </servlet>
> >> >> >>
> >> >> >>         <!-- Servlet Mapping for Acegi Security Framework to work
> >> with
> >> >> >> Tapestry -->
> >> >> >>
> >> >> >>     <servlet-mapping>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>         <url-pattern>/index.html</url-pattern>
> >> >> >>     </servlet-mapping>
> >> >> >>
> >> >> >>     <servlet-mapping>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>         <url-pattern>*.html</url-pattern>
> >> >> >>     </servlet-mapping>
> >> >> >>
> >> >> >>     <servlet-mapping>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>         <url-pattern>*.direct</url-pattern>
> >> >> >>     </servlet-mapping>
> >> >> >>     <servlet-mapping>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>         <url-pattern>*.sdirect</url-pattern>
> >> >> >>     </servlet-mapping>
> >> >> >>     <servlet-mapping>
> >> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >> >>         <url-pattern>*.svc</url-pattern>
> >> >> >>     </servlet-mapping>
> >> >> >>
> >> >> >> <!--
> >> >> >> =========================== SECURING HTML AND PAGE FILES
> >> >> >> ========================================================
> >> >> >> -->
> >> >> >>
> >> >> >>         <security-constraint>
> >> >> >>                 <display-name>Prevent access to raw *.html,
> *.css,
> >> >> >> *.page,
> >> >> >> *.js
> >> >> >> files.</display-name>
> >> >> >>                 <web-resource-collection>
> >> >> >>                         <web-resource-name>Tapestry
> >> >> >> Pages</web-resource-name>
> >> >> >>                         <url-pattern>/html/*</url-pattern>
> >> >> >>                 </web-resource-collection>
> >> >> >>                 <auth-constraint>
> >> >> >>                         <description>No roles, so no direct
> >> >> >> access</description>
> >> >> >>                 </auth-constraint>
> >> >> >>         </security-constraint>
> >> >> >>
> >> >> >> <!--
> >> >> >>
> >> >> >>
> >> >>
> >>
> =================================================================================================
> >>
> >> >> >> -->
> >> >> >>
> >> >> >> </web-app>
> >> >> >>
> >> >> >> If you have any more questions just feel free to ask...
> >> >> >>
> >> >> >> Cheers,
> >> >> >> Jacob
> >> >> >> --
> >> >> >> 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#a10915784
> >>
> >> >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> 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#a10954827
> >>
> >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> 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#a10955847
> >>
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by andyhot <an...@di.uoa.gr>.
Doesn't your app use a hivemodule.xml?
See http://tapestry.apache.org/tapestry4.1/usersguide/hivemind.html on 
where to add this...

You then have to place the sitemap.xml file at the same location, and 
then do the modifications
described at http://tacos.sourceforge.net/hivemind/SiteMap.html

César Augusto Mateus wrote:
> Good afternoon,
> I have a problem configuring the library tacos with spring in my
> environment.
> Perhaps you are using this library.
> How integrate the descriptor of Spring with the service-point of tacos.
> I'm trying this: there is a hivemodule.xml in the folder META_INF of 
> the jar
> tapestry-spring-1.0.0.jar
> According to http://tacos.sourceforge.net/hivemind/SiteMap.html a way of
> begin is enabling the service SiteMap of the library Tacos, but this 
> have a
> hivemodule.xml file also.
> I´m proving put the service-point in the file hivemodule.xml of the jar
> tapestry-spring-1.0.0.jar.
> If you know a indication would be very appreciated.
>
>
> On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
>>
>>
>> No problem,
>> if you have any other questions just feel free to ask...
>>
>> Cheers,
>> Jacob
>>
>>
>> César Augusto Mateus wrote:
>> >
>> > thank you very much Jacob, your help has been very valuable!!!
>> >
>> > On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
>> >>
>> >>
>> >> Hi Cesar,
>> >>
>> >> the datasource is defined in the web.xml:
>> >>
>> >> <!--
>> >> =========================== DATASOURCE
>> >> ==========================================================
>> >> -->
>> >>
>> >>         <resource-ref>
>> >>                 <res-ref-name>OracleDS</res-ref-name>
>> >>                 <res-type>javax.sql.DataSource</res-type>
>> >>                 <res-auth>Container</res-auth>
>> >>         </resource-ref>
>> >>
>> >>
>> >> we tie everything togeather in jboss_service.xml:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >>
>> >> <server>
>> >>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
>> >> name="jboss.har:service=Hibernate">
>> >>                 <attribute
>> >> name="DatasourceName">java:OracleDS</attribute>
>> >>                 <attribute
>> >>
>> >>
>> name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute> 
>>
>> >>                 <attribute name="Dialect">
>> >> org.hibernate.dialect.OracleDialect</attribute>
>> >>                 <attribute name="CacheProviderClass">
>> >>                         org.hibernate.cache.HashtableCacheProvider
>> >>                 </attribute>
>> >>         </mbean>
>> >> </server>
>> >>
>> >> sorry if I confused you... I forgot to post that one..
>> >> Hope it helps,
>> >> Jacob
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> César Augusto Mateus wrote:
>> >> >
>> >> > Hi Jacob, a question perhaps some foo:
>> >> >
>> >> > You construct a bean sessionFactory with
>> >> > org.springframework.jndi.JndiObjectFactoryBean,
>> >> > in addition your bean dataSource is also a
>> >> > org.springframework.jndi.JndiObjectFactoryBean.
>> >> >
>> >> > My question is: it needs from bean sessionFactory the specification
>> of
>> >> a
>> >> > datasource, generally this datasourse is other bean, but in your 
>> case
>> >> the
>> >> > bean dataSource is not referenced from the bean sessionFactory.
>> >> >
>> >> > you would explain to me bean InvestacorpSessionFactory?
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>> >> >>
>> >> >>
>> >> >> Ci Cesar,
>> >> >>
>> >> >> I am using the JTA Transaction Manager. For me that was easier to
>> use
>> >> >> JBoss
>> >> >> JTA then to try to turn it of and instead use the one Hibernate is
>> >> >> providing. I am not an expert on the Transaction Manager, but I
>> assume
>> >> >> that
>> >> >> they are pritty much the same.
>> >> >>
>> >> >> In my applicationContaxt-persistence.xml I have this:
>> >> >>
>> >> >>
>> >> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> >> <beans xmlns="http://www.springframework.org/schema/beans"
>> >> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> >>        xsi:schemaLocation="
>> >> >> http://www.springframework.org/schema/beans
>> >> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>> >> >>
>> >> >>         <!-- DATASOURCE -->
>> >> >>
>> >> >>         <bean id="dataSource"
>> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
>> >> >>                 <property name="jndiName">
>> >> >>                         <value>java:OracleDS</value>
>> >> >>                 </property>
>> >> >>         </bean>
>> >> >>
>> >> >>         <!-- TRANSACTIONS -->
>> >> >>
>> >> >>         <bean id="transactionManager"
>> >> >> class="org.springframework.transaction.jta.JtaTransactionManager">
>> >> >>                 <property name="transactionManagerName"
>> >> >> value="java:/TransactionManager"></property>
>> >> >>                 <property name="userTransactionName"
>> >> >> value="UserTransaction"></property>
>> >> >>         </bean>
>> >> >>
>> >> >>         <bean id="sessionFactory"
>> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
>> >> >>                 <property name="jndiName">
>> >> >>
>> >> >>
>> >> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
>> >> >>                 </property>
>> >> >>         </bean>
>> >> >>
>> >> >>         <bean id="hibernateTemplate"
>> >> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
>> >> >>                 <property name="sessionFactory">
>> >> >>                         <ref bean="sessionFactory"/>
>> >> >>                 </property>
>> >> >>         </bean>
>> >> >>
>> >> >>         <!-- BEAN MAPPING -->
>> >> >>        <bean id="somePojoDao"
>> >> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
>> >> >>                 <property name="hibernateTemplate">
>> >> >>                         <ref bean="hibernateTemplate"/>
>> >> >>                 </property>
>> >> >>         </bean>
>> >> >>
>> >> >>         ......
>> >> >>
>> >> >>
>> >> >> </beans>
>> >> >>
>> >> >> and my web.xml look like this:
>> >> >>
>> >> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> >> <web-app id="Investacorp" version="2.4"
>> >> >>         xmlns="http://java.sun.com/xml/ns/j2ee"
>> >> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> >>         xsi:schemaLocation="
>> >> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>> >> >>
>> >> >>         <!-- WebApp_ID -->
>> >> >>         <display-name>MyCompany</display-name>
>> >> >>
>> >> >> <!--
>> >> >> ================================= SESSION TIME
>> >> >> ================================================
>> >> >> -->
>> >> >>
>> >> >>         <session-config>
>> >> >>                 <session-timeout>1200</session-timeout>
>> >> >>         </session-config>
>> >> >>
>> >> >> <!--
>> >> >> ================================= WELCOME FILE
>> >> >> =================================================
>> >> >> -->
>> >> >>
>> >> >>
>> >> >>         <welcome-file-list>
>> >> >>                 <welcome-file>index.html</welcome-file>
>> >> >>                 <welcome-file>index.jsp</welcome-file>
>> >> >>         </welcome-file-list>
>> >> >>
>> >> >>
>> >> >> <!--
>> >> >> ================================= ERROR PAGE
>> >> >> ===================================================
>> >> >> -->
>> >> >>
>> >> >>         <!-- Predefined Error page if runtime exceptions occur.
>> Toggle
>> >> >> during
>> >> >> debugging  -->
>> >> >>         <error-page>
>> >> >>                 <exception-type>java.lang.RuntimeException
>> >> >> </exception-type>
>> >> >>                 <location>/CustomExceptionPage.html</location>
>> >> >>         </error-page>
>> >> >>
>> >> >>         <error-page>
>> >> >>                 <error-code>403</error-code>
>> >> >>                 <location>/AccessDeniedPage.html</location>
>> >> >>         </error-page>
>> >> >>
>> >> >>         <error-page>
>> >> >>                 <error-code>404</error-code>
>> >> >>                 <location>/CustomExceptionPage.html</location>
>> >> >>         </error-page>
>> >> >>
>> >> >> <!--
>> >> >> =========================== DATASOURCE
>> >> >> ==========================================================
>> >> >> -->
>> >> >>
>> >> >>         <resource-ref>
>> >> >>                 <res-ref-name>OracleDS</res-ref-name>
>> >> >>                 <res-type>javax.sql.DataSource</res-type>
>> >> >>                 <res-auth>Container</res-auth>
>> >> >>         </resource-ref>
>> >> >>
>> >> >>
>> >> >> <!--
>> >> >> =========================== LISTENER
>> >> >> ==========================================================
>> >> >> -->
>> >> >>
>> >> >>         <listener>
>> >> >>
>> >> >> <listener-class>
>> org.springframework.web.context.ContextLoaderListener
>> >> >> </listener-class>
>> >> >>         </listener>
>> >> >>
>> >> >>         <context-param>
>> >> >>             <param-name>contextConfigLocation</param-name>
>> >> >>
>> >> <param-value>/WEB-INF/applicationContext*.xml</param-value>
>> >> >>         </context-param>
>> >> >>
>> >> >> <!--
>> >> >> =========================== MVC APPLICATION CONTROLLER
>> >> >> ==========================================================
>> >> >> -->
>> >> >>
>> >> >>         <servlet>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>
>> >> >> <servlet-class>org.apache.tapestry.ApplicationServlet
>> </servlet-class>
>> >> >>         <load-on-startup>0</load-on-startup>
>> >> >>         </servlet>
>> >> >>
>> >> >>         <!-- Servlet Mapping for Acegi Security Framework to work
>> with
>> >> >> Tapestry -->
>> >> >>
>> >> >>     <servlet-mapping>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>         <url-pattern>/index.html</url-pattern>
>> >> >>     </servlet-mapping>
>> >> >>
>> >> >>     <servlet-mapping>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>         <url-pattern>*.html</url-pattern>
>> >> >>     </servlet-mapping>
>> >> >>
>> >> >>     <servlet-mapping>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>         <url-pattern>*.direct</url-pattern>
>> >> >>     </servlet-mapping>
>> >> >>     <servlet-mapping>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>         <url-pattern>*.sdirect</url-pattern>
>> >> >>     </servlet-mapping>
>> >> >>     <servlet-mapping>
>> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >> >>         <url-pattern>*.svc</url-pattern>
>> >> >>     </servlet-mapping>
>> >> >>
>> >> >> <!--
>> >> >> =========================== SECURING HTML AND PAGE FILES
>> >> >> ========================================================
>> >> >> -->
>> >> >>
>> >> >>         <security-constraint>
>> >> >>                 <display-name>Prevent access to raw *.html, *.css,
>> >> >> *.page,
>> >> >> *.js
>> >> >> files.</display-name>
>> >> >>                 <web-resource-collection>
>> >> >>                         <web-resource-name>Tapestry
>> >> >> Pages</web-resource-name>
>> >> >>                         <url-pattern>/html/*</url-pattern>
>> >> >>                 </web-resource-collection>
>> >> >>                 <auth-constraint>
>> >> >>                         <description>No roles, so no direct
>> >> >> access</description>
>> >> >>                 </auth-constraint>
>> >> >>         </security-constraint>
>> >> >>
>> >> >> <!--
>> >> >>
>> >> >>
>> >>
>> ================================================================================================= 
>>
>> >> >> -->
>> >> >>
>> >> >> </web-app>
>> >> >>
>> >> >> If you have any more questions just feel free to ask...
>> >> >>
>> >> >> Cheers,
>> >> >> Jacob
>> >> >> --
>> >> >> 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#a10915784 
>>
>> >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> 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#a10954827 
>>
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>> -- 
>> 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#a10955847 
>>
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
Good afternoon,
I have a problem configuring the library tacos with spring in my
environment.
Perhaps you are using this library.
How integrate the descriptor of Spring with the service-point of tacos.
I'm trying this: there is a hivemodule.xml in the folder META_INF of the jar
tapestry-spring-1.0.0.jar
According to http://tacos.sourceforge.net/hivemind/SiteMap.html a way of
begin is enabling the service SiteMap of the library Tacos, but this have a
hivemodule.xml file also.
I´m proving put the service-point in the file hivemodule.xml of the jar
tapestry-spring-1.0.0.jar.
If you know a indication would be very appreciated.


On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
>
>
> No problem,
> if you have any other questions just feel free to ask...
>
> Cheers,
> Jacob
>
>
> César Augusto Mateus wrote:
> >
> > thank you very much Jacob, your help has been very valuable!!!
> >
> > On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >>
> >>
> >> Hi Cesar,
> >>
> >> the datasource is defined in the web.xml:
> >>
> >> <!--
> >> =========================== DATASOURCE
> >> ==========================================================
> >> -->
> >>
> >>         <resource-ref>
> >>                 <res-ref-name>OracleDS</res-ref-name>
> >>                 <res-type>javax.sql.DataSource</res-type>
> >>                 <res-auth>Container</res-auth>
> >>         </resource-ref>
> >>
> >>
> >> we tie everything togeather in jboss_service.xml:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >>
> >> <server>
> >>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
> >> name="jboss.har:service=Hibernate">
> >>                 <attribute
> >> name="DatasourceName">java:OracleDS</attribute>
> >>                 <attribute
> >>
> >>
> name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
> >>                 <attribute name="Dialect">
> >> org.hibernate.dialect.OracleDialect</attribute>
> >>                 <attribute name="CacheProviderClass">
> >>                         org.hibernate.cache.HashtableCacheProvider
> >>                 </attribute>
> >>         </mbean>
> >> </server>
> >>
> >> sorry if I confused you... I forgot to post that one..
> >> Hope it helps,
> >> Jacob
> >>
> >>
> >>
> >>
> >>
> >>
> >> César Augusto Mateus wrote:
> >> >
> >> > Hi Jacob, a question perhaps some foo:
> >> >
> >> > You construct a bean sessionFactory with
> >> > org.springframework.jndi.JndiObjectFactoryBean,
> >> > in addition your bean dataSource is also a
> >> > org.springframework.jndi.JndiObjectFactoryBean.
> >> >
> >> > My question is: it needs from bean sessionFactory the specification
> of
> >> a
> >> > datasource, generally this datasourse is other bean, but in your case
> >> the
> >> > bean dataSource is not referenced from the bean sessionFactory.
> >> >
> >> > you would explain to me bean InvestacorpSessionFactory?
> >> >
> >> >
> >> >
> >> >
> >> > On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >> >>
> >> >>
> >> >> Ci Cesar,
> >> >>
> >> >> I am using the JTA Transaction Manager. For me that was easier to
> use
> >> >> JBoss
> >> >> JTA then to try to turn it of and instead use the one Hibernate is
> >> >> providing. I am not an expert on the Transaction Manager, but I
> assume
> >> >> that
> >> >> they are pritty much the same.
> >> >>
> >> >> In my applicationContaxt-persistence.xml I have this:
> >> >>
> >> >>
> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >>        xsi:schemaLocation="
> >> >> http://www.springframework.org/schema/beans
> >> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> >> >>
> >> >>         <!-- DATASOURCE -->
> >> >>
> >> >>         <bean id="dataSource"
> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >> >>                 <property name="jndiName">
> >> >>                         <value>java:OracleDS</value>
> >> >>                 </property>
> >> >>         </bean>
> >> >>
> >> >>         <!-- TRANSACTIONS -->
> >> >>
> >> >>         <bean id="transactionManager"
> >> >> class="org.springframework.transaction.jta.JtaTransactionManager">
> >> >>                 <property name="transactionManagerName"
> >> >> value="java:/TransactionManager"></property>
> >> >>                 <property name="userTransactionName"
> >> >> value="UserTransaction"></property>
> >> >>         </bean>
> >> >>
> >> >>         <bean id="sessionFactory"
> >> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >> >>                 <property name="jndiName">
> >> >>
> >> >>
> >> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
> >> >>                 </property>
> >> >>         </bean>
> >> >>
> >> >>         <bean id="hibernateTemplate"
> >> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
> >> >>                 <property name="sessionFactory">
> >> >>                         <ref bean="sessionFactory"/>
> >> >>                 </property>
> >> >>         </bean>
> >> >>
> >> >>         <!-- BEAN MAPPING -->
> >> >>        <bean id="somePojoDao"
> >> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
> >> >>                 <property name="hibernateTemplate">
> >> >>                         <ref bean="hibernateTemplate"/>
> >> >>                 </property>
> >> >>         </bean>
> >> >>
> >> >>         ......
> >> >>
> >> >>
> >> >> </beans>
> >> >>
> >> >> and my web.xml look like this:
> >> >>
> >> >> <?xml version="1.0" encoding="UTF-8"?>
> >> >> <web-app id="Investacorp" version="2.4"
> >> >>         xmlns="http://java.sun.com/xml/ns/j2ee"
> >> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> >>         xsi:schemaLocation="
> >> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> >> >>
> >> >>         <!-- WebApp_ID -->
> >> >>         <display-name>MyCompany</display-name>
> >> >>
> >> >> <!--
> >> >> ================================= SESSION TIME
> >> >> ================================================
> >> >> -->
> >> >>
> >> >>         <session-config>
> >> >>                 <session-timeout>1200</session-timeout>
> >> >>         </session-config>
> >> >>
> >> >> <!--
> >> >> ================================= WELCOME FILE
> >> >> =================================================
> >> >> -->
> >> >>
> >> >>
> >> >>         <welcome-file-list>
> >> >>                 <welcome-file>index.html</welcome-file>
> >> >>                 <welcome-file>index.jsp</welcome-file>
> >> >>         </welcome-file-list>
> >> >>
> >> >>
> >> >> <!--
> >> >> ================================= ERROR PAGE
> >> >> ===================================================
> >> >> -->
> >> >>
> >> >>         <!-- Predefined Error page if runtime exceptions occur.
> Toggle
> >> >> during
> >> >> debugging  -->
> >> >>         <error-page>
> >> >>                 <exception-type>java.lang.RuntimeException
> >> >> </exception-type>
> >> >>                 <location>/CustomExceptionPage.html</location>
> >> >>         </error-page>
> >> >>
> >> >>         <error-page>
> >> >>                 <error-code>403</error-code>
> >> >>                 <location>/AccessDeniedPage.html</location>
> >> >>         </error-page>
> >> >>
> >> >>         <error-page>
> >> >>                 <error-code>404</error-code>
> >> >>                 <location>/CustomExceptionPage.html</location>
> >> >>         </error-page>
> >> >>
> >> >> <!--
> >> >> =========================== DATASOURCE
> >> >> ==========================================================
> >> >> -->
> >> >>
> >> >>         <resource-ref>
> >> >>                 <res-ref-name>OracleDS</res-ref-name>
> >> >>                 <res-type>javax.sql.DataSource</res-type>
> >> >>                 <res-auth>Container</res-auth>
> >> >>         </resource-ref>
> >> >>
> >> >>
> >> >> <!--
> >> >> =========================== LISTENER
> >> >> ==========================================================
> >> >> -->
> >> >>
> >> >>         <listener>
> >> >>
> >> >> <listener-class>
> org.springframework.web.context.ContextLoaderListener
> >> >> </listener-class>
> >> >>         </listener>
> >> >>
> >> >>         <context-param>
> >> >>             <param-name>contextConfigLocation</param-name>
> >> >>
> >> <param-value>/WEB-INF/applicationContext*.xml</param-value>
> >> >>         </context-param>
> >> >>
> >> >> <!--
> >> >> =========================== MVC APPLICATION CONTROLLER
> >> >> ==========================================================
> >> >> -->
> >> >>
> >> >>         <servlet>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>
> >> >> <servlet-class>org.apache.tapestry.ApplicationServlet
> </servlet-class>
> >> >>         <load-on-startup>0</load-on-startup>
> >> >>         </servlet>
> >> >>
> >> >>         <!-- Servlet Mapping for Acegi Security Framework to work
> with
> >> >> Tapestry -->
> >> >>
> >> >>     <servlet-mapping>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>         <url-pattern>/index.html</url-pattern>
> >> >>     </servlet-mapping>
> >> >>
> >> >>     <servlet-mapping>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>         <url-pattern>*.html</url-pattern>
> >> >>     </servlet-mapping>
> >> >>
> >> >>     <servlet-mapping>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>         <url-pattern>*.direct</url-pattern>
> >> >>     </servlet-mapping>
> >> >>     <servlet-mapping>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>         <url-pattern>*.sdirect</url-pattern>
> >> >>     </servlet-mapping>
> >> >>     <servlet-mapping>
> >> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >> >>         <url-pattern>*.svc</url-pattern>
> >> >>     </servlet-mapping>
> >> >>
> >> >> <!--
> >> >> =========================== SECURING HTML AND PAGE FILES
> >> >> ========================================================
> >> >> -->
> >> >>
> >> >>         <security-constraint>
> >> >>                 <display-name>Prevent access to raw *.html, *.css,
> >> >> *.page,
> >> >> *.js
> >> >> files.</display-name>
> >> >>                 <web-resource-collection>
> >> >>                         <web-resource-name>Tapestry
> >> >> Pages</web-resource-name>
> >> >>                         <url-pattern>/html/*</url-pattern>
> >> >>                 </web-resource-collection>
> >> >>                 <auth-constraint>
> >> >>                         <description>No roles, so no direct
> >> >> access</description>
> >> >>                 </auth-constraint>
> >> >>         </security-constraint>
> >> >>
> >> >> <!--
> >> >>
> >> >>
> >>
> =================================================================================================
> >> >> -->
> >> >>
> >> >> </web-app>
> >> >>
> >> >> If you have any more questions just feel free to ask...
> >> >>
> >> >> Cheers,
> >> >> Jacob
> >> >> --
> >> >> 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#a10915784
> >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> 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#a10954827
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
> --
> 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#a10955847
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by Jacob Bergoo <ja...@gmail.com>.
No problem, 
if you have any other questions just feel free to ask...

Cheers,
Jacob


César Augusto Mateus wrote:
> 
> thank you very much Jacob, your help has been very valuable!!!
> 
> On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
>>
>>
>> Hi Cesar,
>>
>> the datasource is defined in the web.xml:
>>
>> <!--
>> =========================== DATASOURCE
>> ==========================================================
>> -->
>>
>>         <resource-ref>
>>                 <res-ref-name>OracleDS</res-ref-name>
>>                 <res-type>javax.sql.DataSource</res-type>
>>                 <res-auth>Container</res-auth>
>>         </resource-ref>
>>
>>
>> we tie everything togeather in jboss_service.xml:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> <server>
>>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
>> name="jboss.har:service=Hibernate">
>>                 <attribute
>> name="DatasourceName">java:OracleDS</attribute>
>>                 <attribute
>>
>> name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
>>                 <attribute name="Dialect">
>> org.hibernate.dialect.OracleDialect</attribute>
>>                 <attribute name="CacheProviderClass">
>>                         org.hibernate.cache.HashtableCacheProvider
>>                 </attribute>
>>         </mbean>
>> </server>
>>
>> sorry if I confused you... I forgot to post that one..
>> Hope it helps,
>> Jacob
>>
>>
>>
>>
>>
>>
>> César Augusto Mateus wrote:
>> >
>> > Hi Jacob, a question perhaps some foo:
>> >
>> > You construct a bean sessionFactory with
>> > org.springframework.jndi.JndiObjectFactoryBean,
>> > in addition your bean dataSource is also a
>> > org.springframework.jndi.JndiObjectFactoryBean.
>> >
>> > My question is: it needs from bean sessionFactory the specification of
>> a
>> > datasource, generally this datasourse is other bean, but in your case
>> the
>> > bean dataSource is not referenced from the bean sessionFactory.
>> >
>> > you would explain to me bean InvestacorpSessionFactory?
>> >
>> >
>> >
>> >
>> > On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>> >>
>> >>
>> >> Ci Cesar,
>> >>
>> >> I am using the JTA Transaction Manager. For me that was easier to use
>> >> JBoss
>> >> JTA then to try to turn it of and instead use the one Hibernate is
>> >> providing. I am not an expert on the Transaction Manager, but I assume
>> >> that
>> >> they are pritty much the same.
>> >>
>> >> In my applicationContaxt-persistence.xml I have this:
>> >>
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <beans xmlns="http://www.springframework.org/schema/beans"
>> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >>        xsi:schemaLocation="
>> >> http://www.springframework.org/schema/beans
>> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>> >>
>> >>         <!-- DATASOURCE -->
>> >>
>> >>         <bean id="dataSource"
>> >> class="org.springframework.jndi.JndiObjectFactoryBean">
>> >>                 <property name="jndiName">
>> >>                         <value>java:OracleDS</value>
>> >>                 </property>
>> >>         </bean>
>> >>
>> >>         <!-- TRANSACTIONS -->
>> >>
>> >>         <bean id="transactionManager"
>> >> class="org.springframework.transaction.jta.JtaTransactionManager">
>> >>                 <property name="transactionManagerName"
>> >> value="java:/TransactionManager"></property>
>> >>                 <property name="userTransactionName"
>> >> value="UserTransaction"></property>
>> >>         </bean>
>> >>
>> >>         <bean id="sessionFactory"
>> >> class="org.springframework.jndi.JndiObjectFactoryBean">
>> >>                 <property name="jndiName">
>> >>
>> >>
>> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
>> >>                 </property>
>> >>         </bean>
>> >>
>> >>         <bean id="hibernateTemplate"
>> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
>> >>                 <property name="sessionFactory">
>> >>                         <ref bean="sessionFactory"/>
>> >>                 </property>
>> >>         </bean>
>> >>
>> >>         <!-- BEAN MAPPING -->
>> >>        <bean id="somePojoDao"
>> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
>> >>                 <property name="hibernateTemplate">
>> >>                         <ref bean="hibernateTemplate"/>
>> >>                 </property>
>> >>         </bean>
>> >>
>> >>         ......
>> >>
>> >>
>> >> </beans>
>> >>
>> >> and my web.xml look like this:
>> >>
>> >> <?xml version="1.0" encoding="UTF-8"?>
>> >> <web-app id="Investacorp" version="2.4"
>> >>         xmlns="http://java.sun.com/xml/ns/j2ee"
>> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >>         xsi:schemaLocation="
>> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>> >>
>> >>         <!-- WebApp_ID -->
>> >>         <display-name>MyCompany</display-name>
>> >>
>> >> <!--
>> >> ================================= SESSION TIME
>> >> ================================================
>> >> -->
>> >>
>> >>         <session-config>
>> >>                 <session-timeout>1200</session-timeout>
>> >>         </session-config>
>> >>
>> >> <!--
>> >> ================================= WELCOME FILE
>> >> =================================================
>> >> -->
>> >>
>> >>
>> >>         <welcome-file-list>
>> >>                 <welcome-file>index.html</welcome-file>
>> >>                 <welcome-file>index.jsp</welcome-file>
>> >>         </welcome-file-list>
>> >>
>> >>
>> >> <!--
>> >> ================================= ERROR PAGE
>> >> ===================================================
>> >> -->
>> >>
>> >>         <!-- Predefined Error page if runtime exceptions occur. Toggle
>> >> during
>> >> debugging  -->
>> >>         <error-page>
>> >>                 <exception-type>java.lang.RuntimeException
>> >> </exception-type>
>> >>                 <location>/CustomExceptionPage.html</location>
>> >>         </error-page>
>> >>
>> >>         <error-page>
>> >>                 <error-code>403</error-code>
>> >>                 <location>/AccessDeniedPage.html</location>
>> >>         </error-page>
>> >>
>> >>         <error-page>
>> >>                 <error-code>404</error-code>
>> >>                 <location>/CustomExceptionPage.html</location>
>> >>         </error-page>
>> >>
>> >> <!--
>> >> =========================== DATASOURCE
>> >> ==========================================================
>> >> -->
>> >>
>> >>         <resource-ref>
>> >>                 <res-ref-name>OracleDS</res-ref-name>
>> >>                 <res-type>javax.sql.DataSource</res-type>
>> >>                 <res-auth>Container</res-auth>
>> >>         </resource-ref>
>> >>
>> >>
>> >> <!--
>> >> =========================== LISTENER
>> >> ==========================================================
>> >> -->
>> >>
>> >>         <listener>
>> >>
>> >> <listener-class>org.springframework.web.context.ContextLoaderListener
>> >> </listener-class>
>> >>         </listener>
>> >>
>> >>         <context-param>
>> >>             <param-name>contextConfigLocation</param-name>
>> >>            
>> <param-value>/WEB-INF/applicationContext*.xml</param-value>
>> >>         </context-param>
>> >>
>> >> <!--
>> >> =========================== MVC APPLICATION CONTROLLER
>> >> ==========================================================
>> >> -->
>> >>
>> >>         <servlet>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>
>> >> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
>> >>         <load-on-startup>0</load-on-startup>
>> >>         </servlet>
>> >>
>> >>         <!-- Servlet Mapping for Acegi Security Framework to work with
>> >> Tapestry -->
>> >>
>> >>     <servlet-mapping>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>         <url-pattern>/index.html</url-pattern>
>> >>     </servlet-mapping>
>> >>
>> >>     <servlet-mapping>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>         <url-pattern>*.html</url-pattern>
>> >>     </servlet-mapping>
>> >>
>> >>     <servlet-mapping>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>         <url-pattern>*.direct</url-pattern>
>> >>     </servlet-mapping>
>> >>     <servlet-mapping>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>         <url-pattern>*.sdirect</url-pattern>
>> >>     </servlet-mapping>
>> >>     <servlet-mapping>
>> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>> >>         <url-pattern>*.svc</url-pattern>
>> >>     </servlet-mapping>
>> >>
>> >> <!--
>> >> =========================== SECURING HTML AND PAGE FILES
>> >> ========================================================
>> >> -->
>> >>
>> >>         <security-constraint>
>> >>                 <display-name>Prevent access to raw *.html, *.css,
>> >> *.page,
>> >> *.js
>> >> files.</display-name>
>> >>                 <web-resource-collection>
>> >>                         <web-resource-name>Tapestry
>> >> Pages</web-resource-name>
>> >>                         <url-pattern>/html/*</url-pattern>
>> >>                 </web-resource-collection>
>> >>                 <auth-constraint>
>> >>                         <description>No roles, so no direct
>> >> access</description>
>> >>                 </auth-constraint>
>> >>         </security-constraint>
>> >>
>> >> <!--
>> >>
>> >>
>> =================================================================================================
>> >> -->
>> >>
>> >> </web-app>
>> >>
>> >> If you have any more questions just feel free to ask...
>> >>
>> >> Cheers,
>> >> Jacob
>> >> --
>> >> 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#a10915784
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> 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#a10954827
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

-- 
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#a10955847
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
thank you very much Jacob, your help has been very valuable!!!

On 6/4/07, Jacob Bergoo <ja...@gmail.com> wrote:
>
>
> Hi Cesar,
>
> the datasource is defined in the web.xml:
>
> <!--
> =========================== DATASOURCE
> ==========================================================
> -->
>
>         <resource-ref>
>                 <res-ref-name>OracleDS</res-ref-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>         </resource-ref>
>
>
> we tie everything togeather in jboss_service.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <server>
>         <mbean code="org.jboss.hibernate.jmx.Hibernate"
> name="jboss.har:service=Hibernate">
>                 <attribute name="DatasourceName">java:OracleDS</attribute>
>                 <attribute
>
> name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
>                 <attribute name="Dialect">
> org.hibernate.dialect.OracleDialect</attribute>
>                 <attribute name="CacheProviderClass">
>                         org.hibernate.cache.HashtableCacheProvider
>                 </attribute>
>         </mbean>
> </server>
>
> sorry if I confused you... I forgot to post that one..
> Hope it helps,
> Jacob
>
>
>
>
>
>
> César Augusto Mateus wrote:
> >
> > Hi Jacob, a question perhaps some foo:
> >
> > You construct a bean sessionFactory with
> > org.springframework.jndi.JndiObjectFactoryBean,
> > in addition your bean dataSource is also a
> > org.springframework.jndi.JndiObjectFactoryBean.
> >
> > My question is: it needs from bean sessionFactory the specification of a
> > datasource, generally this datasourse is other bean, but in your case
> the
> > bean dataSource is not referenced from the bean sessionFactory.
> >
> > you would explain to me bean InvestacorpSessionFactory?
> >
> >
> >
> >
> > On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >>
> >>
> >> Ci Cesar,
> >>
> >> I am using the JTA Transaction Manager. For me that was easier to use
> >> JBoss
> >> JTA then to try to turn it of and instead use the one Hibernate is
> >> providing. I am not an expert on the Transaction Manager, but I assume
> >> that
> >> they are pritty much the same.
> >>
> >> In my applicationContaxt-persistence.xml I have this:
> >>
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <beans xmlns="http://www.springframework.org/schema/beans"
> >>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>        xsi:schemaLocation="
> >> http://www.springframework.org/schema/beans
> >> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
> >>
> >>         <!-- DATASOURCE -->
> >>
> >>         <bean id="dataSource"
> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >>                 <property name="jndiName">
> >>                         <value>java:OracleDS</value>
> >>                 </property>
> >>         </bean>
> >>
> >>         <!-- TRANSACTIONS -->
> >>
> >>         <bean id="transactionManager"
> >> class="org.springframework.transaction.jta.JtaTransactionManager">
> >>                 <property name="transactionManagerName"
> >> value="java:/TransactionManager"></property>
> >>                 <property name="userTransactionName"
> >> value="UserTransaction"></property>
> >>         </bean>
> >>
> >>         <bean id="sessionFactory"
> >> class="org.springframework.jndi.JndiObjectFactoryBean">
> >>                 <property name="jndiName">
> >>
> >>
> >> <value>java:/hibernate/InvestacorpSessionFactory</value>
> >>                 </property>
> >>         </bean>
> >>
> >>         <bean id="hibernateTemplate"
> >> class="org.springframework.orm.hibernate3.HibernateTemplate">
> >>                 <property name="sessionFactory">
> >>                         <ref bean="sessionFactory"/>
> >>                 </property>
> >>         </bean>
> >>
> >>         <!-- BEAN MAPPING -->
> >>        <bean id="somePojoDao"
> >> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
> >>                 <property name="hibernateTemplate">
> >>                         <ref bean="hibernateTemplate"/>
> >>                 </property>
> >>         </bean>
> >>
> >>         ......
> >>
> >>
> >> </beans>
> >>
> >> and my web.xml look like this:
> >>
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <web-app id="Investacorp" version="2.4"
> >>         xmlns="http://java.sun.com/xml/ns/j2ee"
> >>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>         xsi:schemaLocation="
> >> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> >>
> >>         <!-- WebApp_ID -->
> >>         <display-name>MyCompany</display-name>
> >>
> >> <!--
> >> ================================= SESSION TIME
> >> ================================================
> >> -->
> >>
> >>         <session-config>
> >>                 <session-timeout>1200</session-timeout>
> >>         </session-config>
> >>
> >> <!--
> >> ================================= WELCOME FILE
> >> =================================================
> >> -->
> >>
> >>
> >>         <welcome-file-list>
> >>                 <welcome-file>index.html</welcome-file>
> >>                 <welcome-file>index.jsp</welcome-file>
> >>         </welcome-file-list>
> >>
> >>
> >> <!--
> >> ================================= ERROR PAGE
> >> ===================================================
> >> -->
> >>
> >>         <!-- Predefined Error page if runtime exceptions occur. Toggle
> >> during
> >> debugging  -->
> >>         <error-page>
> >>                 <exception-type>java.lang.RuntimeException
> >> </exception-type>
> >>                 <location>/CustomExceptionPage.html</location>
> >>         </error-page>
> >>
> >>         <error-page>
> >>                 <error-code>403</error-code>
> >>                 <location>/AccessDeniedPage.html</location>
> >>         </error-page>
> >>
> >>         <error-page>
> >>                 <error-code>404</error-code>
> >>                 <location>/CustomExceptionPage.html</location>
> >>         </error-page>
> >>
> >> <!--
> >> =========================== DATASOURCE
> >> ==========================================================
> >> -->
> >>
> >>         <resource-ref>
> >>                 <res-ref-name>OracleDS</res-ref-name>
> >>                 <res-type>javax.sql.DataSource</res-type>
> >>                 <res-auth>Container</res-auth>
> >>         </resource-ref>
> >>
> >>
> >> <!--
> >> =========================== LISTENER
> >> ==========================================================
> >> -->
> >>
> >>         <listener>
> >>
> >> <listener-class>org.springframework.web.context.ContextLoaderListener
> >> </listener-class>
> >>         </listener>
> >>
> >>         <context-param>
> >>             <param-name>contextConfigLocation</param-name>
> >>             <param-value>/WEB-INF/applicationContext*.xml</param-value>
> >>         </context-param>
> >>
> >> <!--
> >> =========================== MVC APPLICATION CONTROLLER
> >> ==========================================================
> >> -->
> >>
> >>         <servlet>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>
> >> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
> >>         <load-on-startup>0</load-on-startup>
> >>         </servlet>
> >>
> >>         <!-- Servlet Mapping for Acegi Security Framework to work with
> >> Tapestry -->
> >>
> >>     <servlet-mapping>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>         <url-pattern>/index.html</url-pattern>
> >>     </servlet-mapping>
> >>
> >>     <servlet-mapping>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>         <url-pattern>*.html</url-pattern>
> >>     </servlet-mapping>
> >>
> >>     <servlet-mapping>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>         <url-pattern>*.direct</url-pattern>
> >>     </servlet-mapping>
> >>     <servlet-mapping>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>         <url-pattern>*.sdirect</url-pattern>
> >>     </servlet-mapping>
> >>     <servlet-mapping>
> >>         <servlet-name>MY_SERVLET_NAME</servlet-name>
> >>         <url-pattern>*.svc</url-pattern>
> >>     </servlet-mapping>
> >>
> >> <!--
> >> =========================== SECURING HTML AND PAGE FILES
> >> ========================================================
> >> -->
> >>
> >>         <security-constraint>
> >>                 <display-name>Prevent access to raw *.html, *.css,
> >> *.page,
> >> *.js
> >> files.</display-name>
> >>                 <web-resource-collection>
> >>                         <web-resource-name>Tapestry
> >> Pages</web-resource-name>
> >>                         <url-pattern>/html/*</url-pattern>
> >>                 </web-resource-collection>
> >>                 <auth-constraint>
> >>                         <description>No roles, so no direct
> >> access</description>
> >>                 </auth-constraint>
> >>         </security-constraint>
> >>
> >> <!--
> >>
> >>
> =================================================================================================
> >> -->
> >>
> >> </web-app>
> >>
> >> If you have any more questions just feel free to ask...
> >>
> >> Cheers,
> >> Jacob
> >> --
> >> 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#a10915784
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
>
> --
> 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#a10954827
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by Jacob Bergoo <ja...@gmail.com>.
Hi Cesar,

the datasource is defined in the web.xml:

<!-- 
=========================== DATASOURCE
========================================================== 
-->

	<resource-ref>
		<res-ref-name>OracleDS</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>


we tie everything togeather in jboss_service.xml:

<?xml version="1.0" encoding="UTF-8"?>

<server>
	<mbean code="org.jboss.hibernate.jmx.Hibernate"
name="jboss.har:service=Hibernate">
		<attribute name="DatasourceName">java:OracleDS</attribute>
		<attribute
name="SessionFactoryName">java:/hibernate/InvestacorpSessionFactory</attribute>
		<attribute name="Dialect">org.hibernate.dialect.OracleDialect</attribute>
		<attribute name="CacheProviderClass">
		        org.hibernate.cache.HashtableCacheProvider
		</attribute>
	</mbean>
</server>

sorry if I confused you... I forgot to post that one..
Hope it helps,
Jacob






César Augusto Mateus wrote:
> 
> Hi Jacob, a question perhaps some foo:
> 
> You construct a bean sessionFactory with
> org.springframework.jndi.JndiObjectFactoryBean,
> in addition your bean dataSource is also a
> org.springframework.jndi.JndiObjectFactoryBean.
> 
> My question is: it needs from bean sessionFactory the specification of a
> datasource, generally this datasourse is other bean, but in your case the
> bean dataSource is not referenced from the bean sessionFactory.
> 
> you would explain to me bean InvestacorpSessionFactory?
> 
> 
> 
> 
> On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>>
>>
>> Ci Cesar,
>>
>> I am using the JTA Transaction Manager. For me that was easier to use
>> JBoss
>> JTA then to try to turn it of and instead use the one Hibernate is
>> providing. I am not an expert on the Transaction Manager, but I assume
>> that
>> they are pritty much the same.
>>
>> In my applicationContaxt-persistence.xml I have this:
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="
>> http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>>
>>         <!-- DATASOURCE -->
>>
>>         <bean id="dataSource"
>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>                 <property name="jndiName">
>>                         <value>java:OracleDS</value>
>>                 </property>
>>         </bean>
>>
>>         <!-- TRANSACTIONS -->
>>
>>         <bean id="transactionManager"
>> class="org.springframework.transaction.jta.JtaTransactionManager">
>>                 <property name="transactionManagerName"
>> value="java:/TransactionManager"></property>
>>                 <property name="userTransactionName"
>> value="UserTransaction"></property>
>>         </bean>
>>
>>         <bean id="sessionFactory"
>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>                 <property name="jndiName">
>>
>>                        
>> <value>java:/hibernate/InvestacorpSessionFactory</value>
>>                 </property>
>>         </bean>
>>
>>         <bean id="hibernateTemplate"
>> class="org.springframework.orm.hibernate3.HibernateTemplate">
>>                 <property name="sessionFactory">
>>                         <ref bean="sessionFactory"/>
>>                 </property>
>>         </bean>
>>
>>         <!-- BEAN MAPPING -->
>>        <bean id="somePojoDao"
>> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
>>                 <property name="hibernateTemplate">
>>                         <ref bean="hibernateTemplate"/>
>>                 </property>
>>         </bean>
>>
>>         ......
>>
>>
>> </beans>
>>
>> and my web.xml look like this:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <web-app id="Investacorp" version="2.4"
>>         xmlns="http://java.sun.com/xml/ns/j2ee"
>>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>         xsi:schemaLocation="
>> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>>
>>         <!-- WebApp_ID -->
>>         <display-name>MyCompany</display-name>
>>
>> <!--
>> ================================= SESSION TIME
>> ================================================
>> -->
>>
>>         <session-config>
>>                 <session-timeout>1200</session-timeout>
>>         </session-config>
>>
>> <!--
>> ================================= WELCOME FILE
>> =================================================
>> -->
>>
>>
>>         <welcome-file-list>
>>                 <welcome-file>index.html</welcome-file>
>>                 <welcome-file>index.jsp</welcome-file>
>>         </welcome-file-list>
>>
>>
>> <!--
>> ================================= ERROR PAGE
>> ===================================================
>> -->
>>
>>         <!-- Predefined Error page if runtime exceptions occur. Toggle
>> during
>> debugging  -->
>>         <error-page>
>>                 <exception-type>java.lang.RuntimeException
>> </exception-type>
>>                 <location>/CustomExceptionPage.html</location>
>>         </error-page>
>>
>>         <error-page>
>>                 <error-code>403</error-code>
>>                 <location>/AccessDeniedPage.html</location>
>>         </error-page>
>>
>>         <error-page>
>>                 <error-code>404</error-code>
>>                 <location>/CustomExceptionPage.html</location>
>>         </error-page>
>>
>> <!--
>> =========================== DATASOURCE
>> ==========================================================
>> -->
>>
>>         <resource-ref>
>>                 <res-ref-name>OracleDS</res-ref-name>
>>                 <res-type>javax.sql.DataSource</res-type>
>>                 <res-auth>Container</res-auth>
>>         </resource-ref>
>>
>>
>> <!--
>> =========================== LISTENER
>> ==========================================================
>> -->
>>
>>         <listener>
>>
>> <listener-class>org.springframework.web.context.ContextLoaderListener
>> </listener-class>
>>         </listener>
>>
>>         <context-param>
>>             <param-name>contextConfigLocation</param-name>
>>             <param-value>/WEB-INF/applicationContext*.xml</param-value>
>>         </context-param>
>>
>> <!--
>> =========================== MVC APPLICATION CONTROLLER
>> ==========================================================
>> -->
>>
>>         <servlet>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>
>> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
>>         <load-on-startup>0</load-on-startup>
>>         </servlet>
>>
>>         <!-- Servlet Mapping for Acegi Security Framework to work with
>> Tapestry -->
>>
>>     <servlet-mapping>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>         <url-pattern>/index.html</url-pattern>
>>     </servlet-mapping>
>>
>>     <servlet-mapping>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>         <url-pattern>*.html</url-pattern>
>>     </servlet-mapping>
>>
>>     <servlet-mapping>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>         <url-pattern>*.direct</url-pattern>
>>     </servlet-mapping>
>>     <servlet-mapping>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>         <url-pattern>*.sdirect</url-pattern>
>>     </servlet-mapping>
>>     <servlet-mapping>
>>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>>         <url-pattern>*.svc</url-pattern>
>>     </servlet-mapping>
>>
>> <!--
>> =========================== SECURING HTML AND PAGE FILES
>> ========================================================
>> -->
>>
>>         <security-constraint>
>>                 <display-name>Prevent access to raw *.html, *.css,
>> *.page,
>> *.js
>> files.</display-name>
>>                 <web-resource-collection>
>>                         <web-resource-name>Tapestry
>> Pages</web-resource-name>
>>                         <url-pattern>/html/*</url-pattern>
>>                 </web-resource-collection>
>>                 <auth-constraint>
>>                         <description>No roles, so no direct
>> access</description>
>>                 </auth-constraint>
>>         </security-constraint>
>>
>> <!--
>>
>> =================================================================================================
>> -->
>>
>> </web-app>
>>
>> If you have any more questions just feel free to ask...
>>
>> Cheers,
>> Jacob
>> --
>> 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#a10915784
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

-- 
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#a10954827
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
Hi Jacob, a question perhaps some foo:

You construct a bean sessionFactory with
org.springframework.jndi.JndiObjectFactoryBean,
in addition your bean dataSource is also a
org.springframework.jndi.JndiObjectFactoryBean.

My question is: it needs from bean sessionFactory the specification of a
datasource, generally this datasourse is other bean, but in your case the
bean dataSource is not referenced from the bean sessionFactory.

you would explain to me bean InvestacorpSessionFactory?




On 6/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>
>
> Ci Cesar,
>
> I am using the JTA Transaction Manager. For me that was easier to use
> JBoss
> JTA then to try to turn it of and instead use the one Hibernate is
> providing. I am not an expert on the Transaction Manager, but I assume
> that
> they are pritty much the same.
>
> In my applicationContaxt-persistence.xml I have this:
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xsi:schemaLocation="
> http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
>
>         <!-- DATASOURCE -->
>
>         <bean id="dataSource"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>                 <property name="jndiName">
>                         <value>java:OracleDS</value>
>                 </property>
>         </bean>
>
>         <!-- TRANSACTIONS -->
>
>         <bean id="transactionManager"
> class="org.springframework.transaction.jta.JtaTransactionManager">
>                 <property name="transactionManagerName"
> value="java:/TransactionManager"></property>
>                 <property name="userTransactionName"
> value="UserTransaction"></property>
>         </bean>
>
>         <bean id="sessionFactory"
> class="org.springframework.jndi.JndiObjectFactoryBean">
>                 <property name="jndiName">
>
>                         <value>java:/hibernate/InvestacorpSessionFactory</value>
>                 </property>
>         </bean>
>
>         <bean id="hibernateTemplate"
> class="org.springframework.orm.hibernate3.HibernateTemplate">
>                 <property name="sessionFactory">
>                         <ref bean="sessionFactory"/>
>                 </property>
>         </bean>
>
>         <!-- BEAN MAPPING -->
>        <bean id="somePojoDao"
> class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
>                 <property name="hibernateTemplate">
>                         <ref bean="hibernateTemplate"/>
>                 </property>
>         </bean>
>
>         ......
>
>
> </beans>
>
> and my web.xml look like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="Investacorp" version="2.4"
>         xmlns="http://java.sun.com/xml/ns/j2ee"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
>         <!-- WebApp_ID -->
>         <display-name>MyCompany</display-name>
>
> <!--
> ================================= SESSION TIME
> ================================================
> -->
>
>         <session-config>
>                 <session-timeout>1200</session-timeout>
>         </session-config>
>
> <!--
> ================================= WELCOME FILE
> =================================================
> -->
>
>
>         <welcome-file-list>
>                 <welcome-file>index.html</welcome-file>
>                 <welcome-file>index.jsp</welcome-file>
>         </welcome-file-list>
>
>
> <!--
> ================================= ERROR PAGE
> ===================================================
> -->
>
>         <!-- Predefined Error page if runtime exceptions occur. Toggle
> during
> debugging  -->
>         <error-page>
>                 <exception-type>java.lang.RuntimeException
> </exception-type>
>                 <location>/CustomExceptionPage.html</location>
>         </error-page>
>
>         <error-page>
>                 <error-code>403</error-code>
>                 <location>/AccessDeniedPage.html</location>
>         </error-page>
>
>         <error-page>
>                 <error-code>404</error-code>
>                 <location>/CustomExceptionPage.html</location>
>         </error-page>
>
> <!--
> =========================== DATASOURCE
> ==========================================================
> -->
>
>         <resource-ref>
>                 <res-ref-name>OracleDS</res-ref-name>
>                 <res-type>javax.sql.DataSource</res-type>
>                 <res-auth>Container</res-auth>
>         </resource-ref>
>
>
> <!--
> =========================== LISTENER
> ==========================================================
> -->
>
>         <listener>
>
> <listener-class>org.springframework.web.context.ContextLoaderListener
> </listener-class>
>         </listener>
>
>         <context-param>
>             <param-name>contextConfigLocation</param-name>
>             <param-value>/WEB-INF/applicationContext*.xml</param-value>
>         </context-param>
>
> <!--
> =========================== MVC APPLICATION CONTROLLER
> ==========================================================
> -->
>
>         <servlet>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>
> <servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
>         <load-on-startup>0</load-on-startup>
>         </servlet>
>
>         <!-- Servlet Mapping for Acegi Security Framework to work with
> Tapestry -->
>
>     <servlet-mapping>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>         <url-pattern>/index.html</url-pattern>
>     </servlet-mapping>
>
>     <servlet-mapping>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>         <url-pattern>*.html</url-pattern>
>     </servlet-mapping>
>
>     <servlet-mapping>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>         <url-pattern>*.direct</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>         <url-pattern>*.sdirect</url-pattern>
>     </servlet-mapping>
>     <servlet-mapping>
>         <servlet-name>MY_SERVLET_NAME</servlet-name>
>         <url-pattern>*.svc</url-pattern>
>     </servlet-mapping>
>
> <!--
> =========================== SECURING HTML AND PAGE FILES
> ========================================================
> -->
>
>         <security-constraint>
>                 <display-name>Prevent access to raw *.html, *.css, *.page,
> *.js
> files.</display-name>
>                 <web-resource-collection>
>                         <web-resource-name>Tapestry
> Pages</web-resource-name>
>                         <url-pattern>/html/*</url-pattern>
>                 </web-resource-collection>
>                 <auth-constraint>
>                         <description>No roles, so no direct
> access</description>
>                 </auth-constraint>
>         </security-constraint>
>
> <!--
>
> =================================================================================================
> -->
>
> </web-app>
>
> If you have any more questions just feel free to ask...
>
> Cheers,
> Jacob
> --
> 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#a10915784
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by Jacob Bergoo <ja...@gmail.com>.
Ci Cesar,

I am using the JTA Transaction Manager. For me that was easier to use JBoss
JTA then to try to turn it of and instead use the one Hibernate is
providing. I am not an expert on the Transaction Manager, but I assume that
they are pritty much the same. 

 In my applicationContaxt-persistence.xml I have this:


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

	<!-- DATASOURCE -->

	<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiName">
			<value>java:OracleDS</value>
		</property>
	</bean>

	<!-- TRANSACTIONS -->

	<bean id="transactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
		<property name="transactionManagerName"
value="java:/TransactionManager"></property>
		<property name="userTransactionName" value="UserTransaction"></property>
	</bean>

	<bean id="sessionFactory"
class="org.springframework.jndi.JndiObjectFactoryBean">
		<property name="jndiName">
			<value>java:/hibernate/InvestacorpSessionFactory</value>
		</property>
	</bean>

	<bean id="hibernateTemplate"
class="org.springframework.orm.hibernate3.HibernateTemplate">
		<property name="sessionFactory">
			<ref bean="sessionFactory"/>
		</property>
	</bean>

	<!-- BEAN MAPPING -->
       <bean id="somePojoDao"
class="com.mycompany.persistence.dao.somepojo.SomePojoDaoImpl">
		<property name="hibernateTemplate">
			<ref bean="hibernateTemplate"/>
		</property>
	</bean>

        ......


</beans>

and my web.xml look like this:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="Investacorp" version="2.4" 
	xmlns="http://java.sun.com/xml/ns/j2ee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
	
	<!-- WebApp_ID -->
	<display-name>MyCompany</display-name>
	
<!-- 
================================= SESSION TIME
================================================ 
-->

	<session-config>
		<session-timeout>1200</session-timeout>
	</session-config>

<!-- 
================================= WELCOME FILE
=================================================
-->


	<welcome-file-list>
		<welcome-file>index.html</welcome-file>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>


<!-- 
================================= ERROR PAGE
=================================================== 
-->

	<!-- Predefined Error page if runtime exceptions occur. Toggle during
debugging  -->
	<error-page>
		<exception-type>java.lang.RuntimeException</exception-type>
		<location>/CustomExceptionPage.html</location>
	</error-page>

	<error-page>
		<error-code>403</error-code>
		<location>/AccessDeniedPage.html</location>
	</error-page>
	
	<error-page>
		<error-code>404</error-code>
		<location>/CustomExceptionPage.html</location>
	</error-page>
 
<!-- 
=========================== DATASOURCE
========================================================== 
-->

	<resource-ref>
		<res-ref-name>OracleDS</res-ref-name>
		<res-type>javax.sql.DataSource</res-type>
		<res-auth>Container</res-auth>
	</resource-ref>


<!-- 
=========================== LISTENER
========================================================== 
-->

	<listener>
	   
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	
	<context-param>
	    <param-name>contextConfigLocation</param-name>
	    <param-value>/WEB-INF/applicationContext*.xml</param-value>
	</context-param>

<!-- 
=========================== MVC APPLICATION CONTROLLER 
========================================================== 
-->

	<servlet>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
       
<servlet-class>org.apache.tapestry.ApplicationServlet</servlet-class>
        <load-on-startup>0</load-on-startup>
	</servlet>

	<!-- Servlet Mapping for Acegi Security Framework to work with Tapestry -->
 
    <servlet-mapping>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
        <url-pattern>/index.html</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
        <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    
    <servlet-mapping>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
        <url-pattern>*.direct</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
        <url-pattern>*.sdirect</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>MY_SERVLET_NAME</servlet-name>
        <url-pattern>*.svc</url-pattern>
    </servlet-mapping>

<!-- 
=========================== SECURING HTML AND PAGE FILES 
======================================================== 
-->

	<security-constraint>
		<display-name>Prevent access to raw *.html, *.css, *.page, *.js
files.</display-name>
		<web-resource-collection>
			<web-resource-name>Tapestry Pages</web-resource-name>
			<url-pattern>/html/*</url-pattern>
		</web-resource-collection>
		<auth-constraint>
			<description>No roles, so no direct access</description>
		</auth-constraint>
	</security-constraint>

<!-- 
================================================================================================= 
-->

</web-app>

If you have any more questions just feel free to ask...

Cheers,
Jacob
-- 
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#a10915784
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by César Augusto Mateus <ce...@gmail.com>.
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 <ja...@gmail.com> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Integration Tapestry 4.0 + Spring 2.0 + Hibernate 3.0 + JBoss 4.2

Posted by Jacob Bergoo <ja...@gmail.com>.
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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org