Patrik,
I'll be using jboss for my app.Actually I'll deploy my App war file on jboss
and I wanted to keep the datasource bean within applicationcontext.xml.
I assume I can just add a bean like below in applicationContext.xml.
<bean id="MyProjDS" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName" value="oracle.jdbc.OracleDriver" />
<property name="url"
value="jdbc:oracle:thin:@localhost:1521:xe" />
<property name="username" value="myproj" />
<property name="password" value="password" />
</bean>
Also I guess I would need to put a reference in SessionFactory.xml
<prop key="hibernate.connection.datasource"><ref local="MyProjDS"/></prop>
Let me know your thoughts?
Thanks,
Deepak.
Patrik Nordwall wrote:
>
> What properties do you use in sculptor-generator.properties?
>
> Are you using Jboss?
> Then you define the datasource as a jboss mbean.
> Example:
> http://fornax.itemis.de/confluence/display/fornax/4.+Archetype+Tutorial+(CSC)#4.ArchetypeTutorial(CSC)-UseMySQLDatabase
>
> /Patrik
>
>
>
> deepshar027 wrote:
>>
>> Hey Guys,
>>
>> I generated code with sculptor using version 1.6.Not sure where I need to
>> define properties for my datasource.
>>
>> I see two files which refer to datasource.
>>
>> persistence.xml
>> <non-jta-data-source>java:comp/env/jdbc/MyProjDS</non-jta-data-source>
>>
>> Also SessionFactory.xml has
>> <prop key="hibernate.connection.datasource">java:jdbc/MyProjDS</prop>
>>
>> Where should I specify DB URL , driver and other properties like
>> connection parameters for my datasource MyProjDS.
>>
>> Please post with an example.
>>
>> Thanks,
>> Deepak.
>>
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Defining-Datasource-Properties.-tp23809982s17564p23810345.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer