[Building Sakai] database and new tool

Steve Swinsburg s.swinsburg at lancaster.ac.uk
Mon Apr 27 15:54:42 PDT 2009


Hi,

Using a project generated by the appbuilder, have a look in the pack/ 
src/webapp/WEB-INF/*.xml
The hibernate mapping files (tool.hbm.xml) are registered with the  
global session factory and when your app comes up with auto.ddl=true  
the tables are created. You don't need your own hibernate.cfg.xml as  
you are not using your own connections, you are using connections from  
the Sakai pool.

As for the ddl folder, those are the sql files that are generated from  
the hibernate mappings. Useful for those that can't use auto.ddl to  
create the tables so need to run the scripts manually. Also useful for  
making DB upgrade scripts. Ordinarily you won't need them (yet).


cheers,
Steve


On 27/04/2009, at 11:31 PM, yolima u wrote:

>
> hi, thanks for the answer.
>
> well i'm using hibernate but i don't know if i'm using it ok. I  
> configure my
> tool.hbm.xml and my hibernate.cfg.xml like other sakai project but  
> my tool
> didn't create the tables in the database.
> i created this tool with sakaiappbuilder and sakaiappbuilder made a  
> folder
> "ddl", in a readme.txt in this folder say that i have to install the  
> folder
> ddl with maven for create *.sql, have i to do this?. why tools like  
> poll
> doesn't have the *.sql and works fine?
>
>
>
> Aaron Zeckoski wrote:
>>
>> We will need a lot more details about your tool in order to help you.
>> For example, are you using hibernate or just some JDBC directly (it  
>> is
>> hard to tell since you mention hibernate and also mention a ddl  
>> file)?
>>
>> This will probably help in the meantime:
>> http://bugs.sakaiproject.org/confluence/display/BOOT/Persistence
>>
>> -AZ
>>
>>
>> On Mon, Apr 27, 2009 at 6:47 PM, yolima u <yolimita.uribe at gmail.com>
>> wrote:
>>>
>>> hi all, i'm doing a new tool for sakai, but i do'nt know what i  
>>> have to
>>> do
>>> for sakai make the tables in the database. The information is all  
>>> in the
>>> hibernate file and in tool/impl/src/sql/mysql/too.sql is the file  
>>> where
>>> it's
>>> the create table.
>>>
>>> i tried with auto dll=true in sakai.properties on tomcat, but it  
>>> didn't
>>> work.
>>>
>>> thanks
>>> --
>>> View this message in context:
>>> http://www.nabble.com/database-and-new-tool-tp23261466p23261466.html
>>> Sent from the Sakai - Development mailing list archive at  
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> sakai-dev mailing list
>>> sakai-dev at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>>
>>> TO UNSUBSCRIBE: send email to
>>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>>> "unsubscribe"
>>>
>>
>>
>>
>> -- 
>> Aaron Zeckoski (aaronz at vt.edu)
>> Senior Research Engineer - CARET - Cambridge University
>> [http://bugs.sakaiproject.org/confluence/display/~aaronz/]
>> Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
>> _______________________________________________
>> sakai-dev mailing list
>> sakai-dev at collab.sakaiproject.org
>> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>> TO UNSUBSCRIBE: send email to
>> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
>> "unsubscribe"
>>
>>
>
> -- 
> View this message in context: http://www.nabble.com/database-and-new-tool-tp23261466p23266649.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org 
>  with a subject of "unsubscribe"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2437 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20090427/1b3df6b9/attachment.bin 


More information about the sakai-dev mailing list