You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2009/08/17 15:21:20 UTC
t5: hibernate connection string
Hi,
I use following in hibernate.cfg.xml to connect to database:
< property
name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true</property
>
This works very well, but it is hard coded, is there a way to put the
particular info in a property file, then pick it up when the t5 program is
loaded?
Thanks,
Angelo
--
View this message in context: http://www.nabble.com/t5%3A-hibernate-connection-string-tp25006666p25006666.html
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: t5: hibernate connection string
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi Uli,
Thanks for the quick response, leaving it in XML is fine, problem is, the
xml file is packaged into a jar, can not find it under the 'ROOT' directory
for me to update, any idea putting that hibernate.cfg.xml somewhere else,
say WEB-INF?
Ulrich Stärk wrote:
>
> contribute a HibernateConfigurer to the HibernateSessionSource service.
> Although I don't quite get
> why putting the connection string into a properties file is any different
> than putting it in the xml
> file...
>
> Uli
>
> On 17.08.2009 15:21 schrieb Angelo Chen:
>> Hi,
>>
>> I use following in hibernate.cfg.xml to connect to database:
>>
>> < property
>> name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true</property
>>
>> This works very well, but it is hard coded, is there a way to put the
>> particular info in a property file, then pick it up when the t5 program
>> is
>> loaded?
>>
>> Thanks,
>>
>> Angelo
>
> ---------------------------------------------------------------------
> 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/t5%3A-hibernate-connection-string-tp25006666p25007693.html
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: t5: hibernate connection string
Posted by Ulrich Stärk <ul...@spielviel.de>.
contribute a HibernateConfigurer to the HibernateSessionSource service. Although I don't quite get
why putting the connection string into a properties file is any different than putting it in the xml
file...
Uli
On 17.08.2009 15:21 schrieb Angelo Chen:
> Hi,
>
> I use following in hibernate.cfg.xml to connect to database:
>
> < property
> name="hibernate.connection.url">jdbc:mysql://localhost/stock?autoReconnect=true</property
>
> This works very well, but it is hard coded, is there a way to put the
> particular info in a property file, then pick it up when the t5 program is
> loaded?
>
> Thanks,
>
> Angelo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org