[JBoss Portal] - Re: PortletStateHolder
by FelderR
Hi Wesley,
thanks for your quick response! Can you post the Jira or forum link of the double post?
I need to fix the problem this week as we go live next wednesday. My solution is to use a PortletFilter that removes all entries in the LRU Map:
| public void doFilter(RenderRequest renderRequest, RenderResponse renderResponse, FilterChain chain) throws IOException, PortletException {
| chain.doFilter(renderRequest, rww);
| PortletStateHolder stateHolder = (PortletStateHolder)config.getPortletContext().getAttribute(PortletStateHolder.class.getName());
| stateHolder.cleanLRUMap();
| }
|
Do you see any drawback when clearing the LRUMap after the Render Phase?
I'm still not clear why the state is hold across requests?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237135#4237135
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237135
16 years, 10 months
[JBoss Cache: Core Edition] - JNDI Deployment
by mraccola
I posted a while back asking for advice on what was the best way to share a JBC instance for all applications on a node, http://www.jboss.org/index.html?module=bb&op=viewtopic&t=151849. The recommendation was to use JNDI and I agree.
However, I am running into the same problem that has been documented on other posts...org.jboss.cache.Cache is not Serilializable. When I try to bind a cache instance to JNDI in WebSphere 6.1 for example I get the following exception:
| A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
| Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
| Context method: bind
| Context name: HQ-M-3040Node01Cell/nodes/HQ-M-3040Node01/servers/server1
| Target name: fleetcycle/cache/jboss-cache
| Other data: Object to bind: org.jboss.cache.DataContainerImpl [0 nodes, 0 locks]
| Exception stack trace: com.ibm.ws.naming.util.CannotBindObjectException: Object is not of any type which can be bound.
|
As described in the WebSphere 6.1 Info Center, http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/co..., this is because the object which is being bound is not Serializable.
Here is the code (in progress) which is creating the cache instance and attempting to bind to JNDI.
| CacheFactory factory = new DefaultCacheFactory();
| Cache cache = factory.createCache(configFileName);
|
| InitialContext ctx = new InitialContext();
| ctx.bind("fleetcycle/cache/jboss-cache", cache);
|
Is there any way to safely bind a JBC cache instance to JNDI?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237125#4237125
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237125
16 years, 10 months
[EJB 3.0] - Re: Oracle 10g with Jboss 4.2.3 Entity Manager / Hibernate
by lafr
XA-connections seem to be very complicated. It took us some time to find the right settings.
What's the content of XA-Datasource description?
Ours is
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <xa-datasource>
| <jndi-name>ora-11g</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@sb2000:1521:11g</xa-datasource-property>
| <xa-datasource-property name="User">lafr</xa-datasource-property>
| <xa-datasource-property name="Password">...</xa-datasource-property>
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <prepared-statement-cache-size>100</prepared-statement-cache-size>
| <metadata>
| <type-mapping>Oracle9i</type-mapping>
| </metadata>
| </xa-datasource>
| </datasources>
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237116#4237116
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237116
16 years, 10 months