Hi Pavel,

I think this is an optional entry. If you need, you can lookup the
datasource (once correctly configured in Jetty, Tomcat and JBoss)
without <resource-ref>.  

But it is a standard. Therefore my opinion is, that we should add
support for <resource-ref>. 

You are right. The documentation for deployment is not complete and your
help would be very welcome.

regards, Oliver

Am Donnerstag, den 04.06.2009, 12:22 +0200 schrieb Pavel Tavoda:
> OK, than is correct resource ref generated to web.xml?
>       <resource-ref>
>               <description>DB Connection</description>
>               <res-ref-name>jdbc/XXXDS</res-ref-name>
>               <res-type>javax.sql.DataSource</res-type>
>               <res-auth>Container</res-auth>
>       </resource-ref>
> 
> Do we have some documentation how to deploy and what to change for
> different versions of Tomcat, Jetty, JBoss that should we lead
> deployers? Don't take my words offensive, I'm just asking. If not I
> should take over some parts.
> 
> TNX
> 
> Pavel
> 
> 
> On Thu, Jun 4, 2009 at 11:34 AM, Oliver Ringel <[email protected]> wrote:
> > Hi Pavel,
> >
> > sorry, but in this point I have to disagree. A widely used practice is
> > not always the best practice. In my eyes configuring the datasource from
> > outside of the application should be the prefered way.
> >
> > Therefore my vote is to keep the default OFF.
> >
> > regards, Oliver
> >
> >
> > Am Donnerstag, den 04.06.2009, 10:43 +0200 schrieb Pavel Tavoda:
> >> Hello,
> >> please make default as best practices (not standards). That's reason
> >> why Sculptor is sooooo good (perfect). If, as you are writing: "it's a
> >> widely used practice to do this." than is better to have it as default
> >> ON. Please just reconsider.
> >>
> >> TNX
> >>
> >> Pavel
> >>
> >> On Thu, Jun 4, 2009 at 12:55 AM, Oliver Ringel <[email protected]> wrote:
> >> > Hi,
> >> >
> >> > as Patrik said sculptor 1.6 will use JPA annotations and Hibernate
> >> > EntityManager for persistence as default. But it is still backward
> >> > compatible to 1.5 by setting the right properties.
> >> >
> >> > Sculptor had no intention to set the datasource as spring bean directly.
> >> > But it's a widely used practice to do this. Therefore I added a new
> >> > generator property.
> >> >
> >> > In your sculptor-generator.properties you can set
> >> >
> >> >  generate.spring.dataSourceSupport=true (default is false)
> >> >
> >> > This will add the datasource to SessionFactory.xml/EntityManager.xml
> >> > and some default properties to generated-spring.properties, e.g.
> >> >
> >> > jdbc.dataSourceClassName=org.apache.commons.dbcp.BasicDataSource
> >> > jdbc.driverClassName=org.hsqldb.jdbcDriver
> >> > jdbc.url=jdbc:hsqldb:mem:<name of project>
> >> > jdbc.username=sa
> >> > jdbc.password=
> >> >
> >> > You can easily override this properties in spring.properties.
> >> >
> >> > In case you need additional properties you can set them through
> >> > SpecialCases.xpt like this
> >> >
> >> > «AROUND templates::Spring::dataSourceAdditions FOR Application»
> >> >            <property name="maxActive" value="50"/>
> >> > «ENDAROUND»
> >> >
> >> > And of course you can define your own datasource bean
> >> >
> >> > «AROUND templates::Spring::dataSource FOR Application»
> >> >        <bean id="dataSource" ... </bean>
> >> > «ENDAROUND»
> >> >
> >> >
> >> > Setting the datasource via a spring bean will not work if you deploy a
> >> > jpa application as ear to jboss. The datasource must be set
> >> > in persistence.xml in this case.
> >> >
> >> > I hope this is what you need.
> >> >
> >> > regards, Oliver
> >> >
> >> > Am Dienstag, den 02.06.2009, 23:14 -0700 schrieb Patrik Nordwall:
> >> >> If you are migrating a 1.5 project to 1.6 I assume you have read the
> >> >> migration guide:
> >> >> http://fornax.itemis.de/confluence/display/fornax/0.+What%27s+New+(CSC)#0.What%27sNew(CSC)-Version1.6.x
> >> >>
> >> >> We have not completely updated the documentation in the Developer's 
> >> >> Guide
> >> >> yet.
> >> >> All properties are here:
> >> >> https://fornax.svn.sourceforge.net/svnroot/fornax/trunk/cartridges/sculptor/fornax-cartridges-sculptor-generator/src/main/resources/default-sculptor-generator.properties
> >> >>
> >> >> The property you are looking for is:
> >> >> generate.jpa.sessionFactorySupport=true
> >> >> (still jpa annotations, but with SessionFactory.xml instead of
> >> >> persistence.xml)
> >> >>
> >> >> I think our recommendation is to use sessionFactorySupport=false (as
> >> >> default), but then I don't know how to define the data source as a 
> >> >> spring
> >> >> bean.
> >> >> Oliver, what do you say about this topic?
> >> >>
> >> >> /Patrik
> >> >>
> >> >>
> >> >>
> >> >> deepshar027 wrote:
> >> >> >
> >> >> > Patrik,
> >> >> >
> >> >> > Thanks for that.I have a new problem now which is not related to this
> >> >> > thread.
> >> >> > Actually I deleted all my sources from src\generated\resources so that
> >> >> > they can be generated again when I run the workflow.
> >> >> >
> >> >> > However when I run the workflow again , I dont see SessionFactory.xml 
> >> >> > ? I
> >> >> > guess earlier I was using sculptor version 1.5 and then switched to 
> >> >> > 1.6
> >> >> > .Is SessionFactory.xml not generated for 1.6?
> >> >> > If its not generated then where should be the datasource defined?
> >> >> >
> >> >> > Let me know if there is any documentation available for details on 
> >> >> > various
> >> >> > sources generated.
> >> >> >
> >> >> >
> >> >> > Rgds,
> >> >> > Deepak.
> >> >> >
> >> >>
> >> >
> >> >
> >> > ------------------------------------------------------------------------------
> >> > OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> >> > looking to deploy the next generation of Solaris that includes the latest
> >> > innovations from Sun and the OpenSource community. Download a copy and
> >> > enjoy capabilities such as Networking, Storage and Virtualization.
> >> > Go to: http://p.sf.net/sfu/opensolaris-get
> >> > _______________________________________________
> >> > Fornax-developer mailing list
> >> > [email protected]
> >> > https://lists.sourceforge.net/lists/listinfo/fornax-developer
> >> >
> >>
> >> ------------------------------------------------------------------------------
> >> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> >> looking to deploy the next generation of Solaris that includes the latest
> >> innovations from Sun and the OpenSource community. Download a copy and
> >> enjoy capabilities such as Networking, Storage and Virtualization.
> >> Go to: http://p.sf.net/sfu/opensolaris-get
> >> _______________________________________________
> >> Fornax-developer mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> >>
> >
> >
> > ------------------------------------------------------------------------------
> > OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> > looking to deploy the next generation of Solaris that includes the latest
> > innovations from Sun and the OpenSource community. Download a copy and
> > enjoy capabilities such as Networking, Storage and Virtualization.
> > Go to: http://p.sf.net/sfu/opensolaris-get
> > _______________________________________________
> > Fornax-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/fornax-developer
> >
> 
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
> looking to deploy the next generation of Solaris that includes the latest 
> innovations from Sun and the OpenSource community. Download a copy and 
> enjoy capabilities such as Networking, Storage and Virtualization. 
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Fornax-developer mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/fornax-developer
> 


------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to