You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jcs-users@jakarta.apache.org by danparker <da...@chordiant.com> on 2008/09/29 19:12:40 UTC
Re: Using Application server JAAS auth alias and datasource for
JDBCDiskCache
Is there a way of externalizing the database username and password? Do you
know if we can put those as system properties instead of in the
configuration file?
hanasakijiji wrote:
>
> Take a look below... It looks like JCS bypasses the use of JNDI
> datasources
> (handy feature for applications not running in a Appserver) and provides
> its
> own implemenation of the concept. Look at what is highlighted below...
> Perhaps try the JNDI url for the "url" and a table name of [emptyString]?
> Long shot... but worth a shot... If not a feature enhancement request.
>
> *http://jakarta.apache.org/jcs/JDBCDiskCacheProperties.html*
> JDBC Disk Configuration Properties PropertyDescriptionRequired Default
> Value
> MaxPurgatorySize The maximum number of items allowed in the queue of items
> to be written to disk. N5000 url The database url. The *database name will
> be added to this value to create the full database url*. Y
> databaseThis is appended to the url.Y
> driverClassName The class name of the driver to talk to your database. Y
> tableNameThe name of the table.N JCS_STOREtestBeforeInsert Should the disk
> cache do a select before trying to insert new element on update, or should
> it try to insert and handle the error. Ntrue maxActive This sets the
> maximum
> number of connections allowed. Y
> allowRemoveAll Should the disk cache honor remove all (i.e. clear)
> requests.
> You might set this to false to prevent someone from accidentally clearing
> out an entire database. Ntrue UseDiskShrinker Should the disk cache try to
> delete expired items from the database. Ntrue ShrinkerIntervalSecondsHow
> often should the disk shrinker run.N 300
>
>
> *** Also note: *If you are talking about the JCS cache for hibernate the
> following is relevant...
> *"By default, Hibernate uses EHCache for JVM-level caching. (JCS support
> is
> now deprecated and will be removed in a future version of Hibernate.)"*
> http://docs.jboss.org/ejb3/app-server/Hibernate3/reference/en/html_single/
>
> *Table 19.1. Cache Providers*
> CacheProvider classType Cluster SafeQuery Cache Supported Hashtable (not
> intended for production use)org.hibernate.cache.HashtableCacheProvider
> memory yesEHCacheorg.hibernate.cache.EhCacheProvider memory, disk yes
> OSCacheorg.hibernate.cache.OSCacheProvider memory, disk yesSwarmCache
> org.hibernate.cache.SwarmCacheProvider clustered (ip multicast)yes
> (clustered invalidation) JBoss TreeCache
> org.hibernate.cache.TreeCacheProviderclustered (ip multicast),
> transactional yes
> (replication)yes (clock sync req.)
>
> On Mon, Aug 18, 2008 at 4:29 PM, danparker <da...@chordiant.com>
> wrote:
>>
>> We have many environments for development, testing and production that we
>> need to support.
>>
>> Is there an alternative to using a db url, username & password is there a
>> way to leverage the application server datasource name, db alias and JAAS
>> authentication?
>>
>> This will enable us to make the JCS configuration environment agnostic.
>>
>>
>> Dan
>>
>>
>> --
>> View this message in context:
> http://www.nabble.com/Using-Application-server-JAAS-auth-alias-and-datasource-for-JDBCDiskCache-tp19039424p19039424.html
>> Sent from the JCS - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jcs-users-help@jakarta.apache.org
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Using-Application-server-JAAS-auth-alias-and-datasource-for-JDBCDiskCache-tp19039424p19727923.html
Sent from the JCS - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org
Re: Using Application server JAAS auth alias and datasource for JDBCDiskCache
Posted by Aaron Smuts <as...@yahoo.com>.
You can use system properties for any property. Simply wrap it in ${}. So, ${MYPASSWORD} would be replaced by a system property named MYPASSWORD.
Aaron
--- On Mon, 9/29/08, danparker <da...@chordiant.com> wrote:
> From: danparker <da...@chordiant.com>
> Subject: Re: Using Application server JAAS auth alias and datasource for JDBCDiskCache
> To: jcs-users@jakarta.apache.org
> Date: Monday, September 29, 2008, 10:12 AM
> Is there a way of externalizing the database username and
> password? Do you
> know if we can put those as system properties instead of in
> the
> configuration file?
>
>
>
> hanasakijiji wrote:
> >
> > Take a look below... It looks like JCS bypasses the
> use of JNDI
> > datasources
> > (handy feature for applications not running in a
> Appserver) and provides
> > its
> > own implemenation of the concept. Look at what is
> highlighted below...
> > Perhaps try the JNDI url for the "url" and a
> table name of [emptyString]?
> > Long shot... but worth a shot... If not a feature
> enhancement request.
> >
> >
> *http://jakarta.apache.org/jcs/JDBCDiskCacheProperties.html*
> > JDBC Disk Configuration Properties
> PropertyDescriptionRequired Default
> > Value
> > MaxPurgatorySize The maximum number of items allowed
> in the queue of items
> > to be written to disk. N5000 url The database url. The
> *database name will
> > be added to this value to create the full database
> url*. Y
> > databaseThis is appended to the url.Y
> > driverClassName The class name of the driver to talk
> to your database. Y
> > tableNameThe name of the table.N
> JCS_STOREtestBeforeInsert Should the disk
> > cache do a select before trying to insert new element
> on update, or should
> > it try to insert and handle the error. Ntrue maxActive
> This sets the
> > maximum
> > number of connections allowed. Y
> > allowRemoveAll Should the disk cache honor remove all
> (i.e. clear)
> > requests.
> > You might set this to false to prevent someone from
> accidentally clearing
> > out an entire database. Ntrue UseDiskShrinker Should
> the disk cache try to
> > delete expired items from the database. Ntrue
> ShrinkerIntervalSecondsHow
> > often should the disk shrinker run.N 300
> >
> >
> > *** Also note: *If you are talking about the JCS cache
> for hibernate the
> > following is relevant...
> > *"By default, Hibernate uses EHCache for
> JVM-level caching. (JCS support
> > is
> > now deprecated and will be removed in a future version
> of Hibernate.)"*
> >
> http://docs.jboss.org/ejb3/app-server/Hibernate3/reference/en/html_single/
> >
> > *Table 19.1. Cache Providers*
> > CacheProvider classType Cluster SafeQuery Cache
> Supported Hashtable (not
> > intended for production
> use)org.hibernate.cache.HashtableCacheProvider
> > memory yesEHCacheorg.hibernate.cache.EhCacheProvider
> memory, disk yes
> > OSCacheorg.hibernate.cache.OSCacheProvider memory,
> disk yesSwarmCache
> > org.hibernate.cache.SwarmCacheProvider clustered (ip
> multicast)yes
> > (clustered invalidation) JBoss TreeCache
> > org.hibernate.cache.TreeCacheProviderclustered (ip
> multicast),
> > transactional yes
> > (replication)yes (clock sync req.)
> >
> > On Mon, Aug 18, 2008 at 4:29 PM, danparker
> <da...@chordiant.com>
> > wrote:
> >>
> >> We have many environments for development, testing
> and production that we
> >> need to support.
> >>
> >> Is there an alternative to using a db url,
> username & password is there a
> >> way to leverage the application server datasource
> name, db alias and JAAS
> >> authentication?
> >>
> >> This will enable us to make the JCS configuration
> environment agnostic.
> >>
> >>
> >> Dan
> >>
> >>
> >> --
> >> View this message in context:
> >
> http://www.nabble.com/Using-Application-server-JAAS-auth-alias-and-datasource-for-JDBCDiskCache-tp19039424p19039424.html
> >> Sent from the JCS - Users mailing list archive at
> Nabble.com.
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> jcs-users-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Using-Application-server-JAAS-auth-alias-and-datasource-for-JDBCDiskCache-tp19039424p19727923.html
> Sent from the JCS - Users mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> jcs-users-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> jcs-users-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jcs-users-help@jakarta.apache.org