[JBoss Cache: Core Edition] - ExpirationPolicy not working
by krishnan366
Hi ,
I am setting up expirationalgorithm in my code as follows
| long timeout = 60*1000;
| Long expTime = new Long(System.currentTimeMillis()+timeout);
| ExpirationAlgorithmConfig expirationConfiguration = new ExpirationAlgorithmConfig();
| expirationConfiguration.setTimeToLive(1000);
| expirationConfiguration.setExpirationKeyName("expiryTime");
|
| EvictionConfig ec = new EvictionConfig();
| List<EvictionRegionConfig> ercs = new ArrayList<EvictionRegionConfig>();
|
|
| keyNode.put(ExpirationAlgorithmConfig.EXPIRATION_KEY, expTime);
| EvictionRegionConfig erc = new EvictionRegionConfig(keyNode.getFqn(), expirationConfiguration);
|
| ercs.add(erc);
| ec.setEvictionRegionConfigs(ercs);
| objCache.getConfiguration().setEvictionConfig(ec);
|
1) On setting this , I expect eviction to run after a minute on this node, but it does not .
2) I do not have any settings in my config file for eviction. I do have a Cacheloader setup in my config file. On eviction , will the node get expired and be removed from cacheloader as well ?
>From the log files
EvictionRegionConfig{regionFqn=/data/key109, eventQueueSize=null, evictionAlgorithmConfig=ExpirationAlgorithmConfig{expirationKeyName='expiryTime', warnNoExpirationKey=true, timeToLive=1000, maxNodes=-1, minTTL=-1}, evictionActionPolicyClassName='null'}
Is there anything else I am missing for the eviction to run?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226627#4226627
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226627
17 years, 2 months
[JBoss Portal] - Problem with getRequest in different beans in portal
by aj_jboss
Hi
In my project I have 2 modules(Job, Customer).
For that I have created 2 beans, jobBean and custBean.
My job.jsp displays job information from jobBean.
On this page, when I click on the customer name hyperlink to display the customer information, it goes to custBean.java and there if i try to get the request using
|
| (HttpServletRequest) FacesContext.getCurrentInstance()
| .getExternalContext().getRequest();
|
|
it gives the error
|
| 21:28:23,864 ERROR [STDERR] Apr 24, 2009 9:28:23 PM javax.faces.event.MethodExpressionActionListener processAction
| SEVERE: java.lang.ClassCastException: org.jboss.portlet.JBossActionRequest
| at com.geinfra.geenergy.psrp.util.HttpJSFUtil.getRequest(HttpJSFUtil.java:23)
| at com.geinfra.geenergy.psrp.backingbean.CustomerBackingBean.openRegionPage(CustomerBackingBean.java:263)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.apache.el.parser.AstValue.invoke(AstValue.java:131)
| at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at org.apache.jasper.el.JspMethodExpression.invoke(JspMethodExpression.java:68)
| at javax.faces.event.MethodExpressionActionListener.processAction(MethodExpressionActionListener.java:88)
| at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
| at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:746)
| at javax.faces.component.UICommand.broadcast(UICommand.java:368)
| at org.ajax4jsf.component.UIDataAdaptor.broadcast(UIDataAdaptor.java:1359)
| at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:317)
| at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:292)
| at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:249)
| at org.ajax4jsf.component.AjaxViewRoot.processApplication(AjaxViewRoot.java:462)
| at com.sun.faces.portlet.LifecycleImpl$InvokeApplicationPhase.execute(LifecycleImpl.java:672)
| at com.sun.faces.portlet.LifecycleImpl.phase(LifecycleImpl.java:330)
| at com.sun.faces.portlet.LifecycleImpl.execute(LifecycleImpl.java:246)
| at com.sun.faces.portlet.FacesPortlet.processAction(FacesPortlet.java:226)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeAction(PortletContainerImpl.java:458)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:401)
| at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInt
| erceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(T
| ransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(T
| ransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.portlet.HeaderInterceptor.invoke(HeaderInterceptor.java:50)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor.invoke(ProducerCacheInterceptor.java:53)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.core.aspects.portlet.AjaxInterceptor.invoke(AjaxInterceptor.java:51)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.ModesInterceptor.invoke(ModesInterceptor.java:62)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.bridge.BridgeInterceptor.invoke(BridgeInterceptor.java:47)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor.invoke(WindowStatesInterceptor.java:55)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor.invoke(PortletSessionSynchroniz
| ationInterceptor.java:80)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor.invoke(ContextTrackerInterceptor.java:46)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:115)
| at org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor$1.doCallback(ContextDispatcherInterceptor.j
| ava:104)
|
|
Please help me to solve this issue.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226622#4226622
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226622
17 years, 2 months
[Persistence, JBoss/CMP, Hibernate, Database] - DB failover in 4.2.3 questions
by FrankTheTank
I am using JBoss AS 4.2.3 in combination with Postgres.
My AppServers are clustered and use a ha-local-tx-datasource to map against two PG databases (primary A and secondary B).
I am using standard EJB3 with an EJB3 Cache.
Now a scenario is needed where when the primary db fails, the system will fail-over to the other one.
This works when A fails over to B.
Now if I bring B back in, and then let A fail, the system will not switch back to A.
1) Am I missing something?
2) Will this even work?
3) I currently have the idle-timeout-minutes set to 1 and if I set it to 0 it seems to mean never. Though half a minute (1/2 idle time, what the doc claims) is still a lot of time in a real-time environment.
The doc also states that the 1/2 comes from the IdleRemover value, but where can I set it, if at all?
4) Would it be theoretically possible to be able to dynamically configure the connection-url in some way?
>From what I read something like this would only be available in JBoss 5. Is this correct?
thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4226621#4226621
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4226621
17 years, 2 months