Showing posts with label applicationcontext. Show all posts
Showing posts with label applicationcontext. Show all posts

May 4, 2014

How to expose spring ehcache 2.8.2 to jmx

In this version ehcache statistics is enabled by default.

I am using ehcache as spring cache.

it's easy

find the place where you define your config
like 'net.sf.ehcache.config.Configuration config = new net.sf.ehcache.config.Configuration()'

in my case i use annotations therefore i got this line in the code, in your case, maybe defined as bean inside the xml .

add the following :
      'config.setMonitoring(net.sf.ehcache.config.Configuration.Monitoring.ON.name());'

Yeah i wondered too why it's not possible to give the enum only .. maybe in the next version... '

Worked for me .
Dor

Nov 23, 2010

at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:111)

Hi,
My Configuration is as follow: WebSphere Application Server 6.1.0.19, it seems that this is sort of bug they have.
Offered solutions:
Hopefully it helps,
Recommended link to look over : Click Here.
Dor

Spring LDAP dynamic connecting

Hi,
Lately i saw a question in one of spring ldap forums, were one of guys there asked this question:
How can i connect ldap without using spring xml (application context xml file).
My answer to him was that that i prefer and need in my project to use it dynamically intead of known configuration that can be configured in spring application context file (beans).
This was my solution for him:
LdapContextSource ldapContextSource = new LdapContextSource();
ldapContextSource.setUrl("ldap://localhost:portnumber");
ldapContextSource.setBase("ou=users, ou=system");//*
ldapContextSource.setUserDn("username to connect");
ldapContextSource.setPassword("password");
ldapContextSource.afterPropertiesSet();
//* the base is not necessary needed, it depends what do you need.
Bye,
Dor