Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
LSCS in WebSphere, shared library / override question
Adam Stoller
Environment
[indent]TS/OD/LS 7.2.1 Patch 1 on Linux[/indent]
Scenario
Find more posts tagged with
Comments
cecilb63
We changed the persistence-conext.xml to use a datasource. That way the WAS datasource config carries the environment-specific info and the lscs-conf.properties never has to change.
We do this with a two node cluster no issue. We set the currentSchema property in WAS Admin to LSCSA for one node and LSCSB for the other.
Here's the xml changes
class="org.springframework.jndi.JndiObjectFactoryBean" destroy-method="close">
${dataSource.jndiName}
${dataSource.lookupOnStartup}
${dataSource.cache}
${dataSource.proxyInterface}
Here's the lcsc-conf.oproperties
dataSource.jndiName=jdbc/LSCSRT
dataSource.lookupOnStartup=false
dataSource.cache=true
dataSource.proxyInterface=javax.sql.DataSource
cecilb63
<!-- DataSource Definition -->
<bean id="dataSource"
class="org.springframework.jndi.JndiObjectFactoryBean" destroy-method="close">
<property name="jndiName">
<value>${dataSource.jndiName}</value>
</property>
<property name="lookupOnStartup">
<value>${dataSource.lookupOnStartup}</value>
</property>
<property name="cache">
<value>${dataSource.cache}</value>
</property>
<property name="proxyInterface">
<value>${dataSource.proxyInterface}</value>
</property>
</bean>
<!--
<bean id="dataSource"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName">
<! - - value>com.mysql.jdbc.Driver</value - ->
<value>${dataSource.driverClassName}</value>
</property>
<property name="url">
<! - - value>jdbc:mysql:///iwrr</value - ->
<value>${dataSource.url}</value>
</property>
<property name="username">
<value>${dataSource.username}</value>
</property>
<property name="password">
<value>${dataSource.password}</value>
</property>
<property name="validationQuery">
<value>SELECT COUNT(*) FROM hi_value</value>
</property>
<property name="testOnBorrow">
<value>true</value>
</property>
<property name="maxActive">
<value>${dataSource.maxConnections}</value>
</property>
</bean>
-->
Adam Stoller
Hmm, well I'll pass the information along (not my area of expertise).
I'm still curious if it's possible to do this with a shared library specification in WAS - since that's how they handle a configuration override in LSDS here, so it would be a consistent process.
cecilb63
Perhaps look into using a datasource which would never vary in the lscs-conf file.
crosstab.jpg