HP Integrity NonStop J-Series User Manual

Page 193

Advertising
background image

1.

Create a bean for the class org.hibernate.dialect.SqlmxInterceptor and inject
applyBrowseAccessTo

property with the Regex Patterns in the bean definition file.

For example:

<bean id="Interceptor"
class="org.hibernate.dialect.SqlmxInterceptor">
<property name="applyBrowseAccessTo">
<list>
<!--
INCLUDE LIST- Please Specify a regular expression
(regex pattern) here. You can specify more than one
regex by adding any number of value tags, for ex:
<value>regex</value>. If any of these regex
matches with the query browse access will be enabled
-->

<value>select.*</value>
</list>
</property>
</bean>

2.

In the SessionFactory bean, inject the entityInterceptor property with the bean
created in the previous step. For example:

<bean id="mySessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="entityInterceptor" ref="Interceptor" />
<property name="hibernateProperties">
<value>
hibernate.connection.url= .............
hibernate.connection.driver_class= .......
hibernate.connection.username= ..........
.....
.....
.....
</value>
</property>
</bean>

Enabling Browse Access

193

Advertising
This manual is related to the following products: