Velocity and reading template from database using hibernate

View: New views
1 Messages — Rating Filter:   Alert me  

Velocity and reading template from database using hibernate

by KumarE :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

        what all are the configuration to be done in order to access velocity template from the data base using Hibernate configuration, may be i say, i configured hibernate and it is connecting to database and i am  able to access the template  from it. but i saw in doc which mentions configuration setting  for DataSourceResourceLoader

resource.loader = file, ds

ds.resource.loader.public.name = DataSource
ds.resource.loader.description = Velocity DataSource Resource Loader
ds.resource.loader.class = org.apache.velocity.runtime.resource.loader.DataSourceResourceLoader
ds.resource.loader.resource.datasource = java:comp/env/jdbc/Velocity
ds.resource.loader.resource.table = tb_velocity_template
ds.resource.loader.resource.keycolumn = id_template
ds.resource.loader.resource.templatecolumn = template_definition
ds.resource.loader.resource.timestampcolumn = template_timestamp
ds.resource.loader.cache = false
ds.resource.loader.modificationCheckInterval = 60

whether above  configuration is applicable if we are using hibernate for database communication 
and  also is there need to build any more tables apart from table structure

CREATE TABLE tb_velocity_template (
id_template varchar (40) NOT NULL ,
template_definition text (16) NOT NULL ,
template_timestamp datetime NOT NULL
)

for smooth functioning of velocity

Regards,
Kumar
LightInTheBox - Buy quality products at wholesale price