我需要在使用Spring 3.1版和Websphere的項目中實現Ehcache。我試圖谷歌有關這個話題的東西,但我could'nt找到任何東西。你們有沒有使用過這三種工具?提前致謝。我可以在Spring 3.1和Ehcache中使用Websphere嗎?
0
A
回答
0
根據EhCache docs,它會不是自動檢測Websphere事務管理器。
自動檢測到的事務管理器
的Ehcache自動檢測和使用下列事務 經理以下順序:
- GenericJNDI(如Glassfish的,JBoss的,JTOM和註冊任何其他 自己在JNDI的標準位置 java:/ TransactionManager
- 的Weblogic(自2.4.0)
- Bitronix
- Atomikos公司
不需要配置;他們開箱即用。首先使用 。
您可以按如下方式進行配置。
如果你的事務管理器是不是在上面的列表或者您希望 更改優先級,提供基於一個 實施net.sf.ehcache.transaction.manager.TransactionManagerLookup和你自己的查找類 指定它來代替默認的TransactionManagerLookup的 ehcache.xml中:
<transactionManagerLookup
class= "com.mycompany.transaction.manager.MyTransactionManagerLookupClass"
properties="" propertySeparator=":"/>
並以&使用Spring集成了的Ehcache,請參閱本link
從Spring doc S,
36。3聲明基於註釋的緩存緩存聲明中,抽象提供了一組Java註釋:
@Cacheable觸發緩存人口@CacheEvict觸發高速緩存收回
@CachePut沒有與干擾更新緩存方法執行
@Caching重新組合的多個高速緩存操作在 方法施加
@CacheConfig在類級別共享一些常見的緩存相關設置
相關問題
- 1. 我可以在EJB 3.1項目中使用Gin和Guice嗎?
- 2. Spring 3.1緩存註解EhCache
- 3. 我可以使用WebSphere 6.1 for JSFunit嗎?
- 4. 我可以在GAE上使用Spring嗎?
- 5. 我可以在HAML 3.1中使用render:layout中的render:layout嗎?
- 6. 我可以在Spring Security中使用Spring Social嗎?
- 7. 我可以在Spring 3.0.2中使用Spring Security 3.0.7嗎?
- 8. 我可以用layoutdialect使用spring thymeleaf嗎?
- 9. HIbernate 3.5.1 - 我可以放入EHCache 2.0.1嗎?
- 10. 我可以在單個應用程序中使用Spring MVC和Spring WS嗎?
- 11. 我可以一起使用httpclient 3.1和4.0嗎?
- 12. 我應該如何在ehCache中使用@CachePut和@CacheEvict註解(ehCache 2.4.4,Spring 3.1.1)
- 13. Spring Roo和EhCache
- 14. 我可以在Spring JUnit測試中使用@Import嗎?
- 15. 我可以在Spring EL中使用屬性佔位符嗎?
- 16. 我可以在Spring bean定義中使用相對路徑嗎?
- 17. 我可以在bean id屬性中使用Spring EL嗎?
- 18. 我可以一起使用Spring的util:properties和context:property-placeholder嗎?
- 19. 可以在extendedDocumentRoot中使用WebSphere變量嗎?
- 20. 爲新項目使用Rails 3.1可以嗎?難以轉換嗎?
- 21. 我可以在XCode 3.1中移動XCode,Cocoa和用戶模板的順序嗎?
- 22. 我可以使用當前版本的Unitils(3.1)與JPA 2.0嗎?
- 23. 我可以在Spring上處理POJO嗎?
- 24. 這個用例可以在ehcache中解決嗎?
- 25. ,我還可以在3.1模擬器中創建項目嗎?
- 26. Ruby on Rails和WebSphere我可以同時擁有兩者嗎?
- 27. 我可以在枚舉上使用Spring的@Component嗎?
- 28. 我可以在Linqpad中使用IronPython嗎?
- 29. 我可以在UIScrollView中使用UIRefreshControl嗎?
- 30. 我可以在iOS中使用system()嗎?