[JBossCache] - Re: Pojo doesn't get replicated in datastore
by jason.greene@jboss.com
This is an Interesting use case. It poses a problem because with inheritance, field changes can, and in this case are performed by the code in the super class. This is normally solved by instrumenting the super class as well. However, with JDK collection types, we can not redefine them, since they are on the bootclasspath, and thus would violate the JRE license. So for those types proxies are used. The proxies only follow the collection interfaces, so any additional state can't be stored. Perhaps an extendable type handler system is needed, that would you to customize how a type is stored in the cache. I will look at that as a future enhancement.
For now you should be able to work around this problem, by using delegation instead of inheritance. Try modifying SimpleCircularBuffer to implement List, and then add a field which is an ArrayList, which you delegate all calls too (with the exception of your additional methods)
Let me know your findings. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112561#4112561
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112561
18 years, 4 months
[Messaging, JMS & JBossMQ] - not start MDB delivery automatically
by dklio
Hi all!
I've got an MDB that listens to a specific queue and performs further calls to business EJBs and MBeans. The problem is MBeans being called should be initialized by a system operator (human). Thus if there are messages in the queue while JBoss is starting, MDB will throw runtime exception because of some MBeans it calls are not initialized yet.
The solution is simple. We are to prevent MDB from invoking while JBoss is starting and MBeans are initialized and enable invocation afterwards. It was accomplished rather easily with Standard Message Driven Bean. There were invoker-proxy-binding/proxy-factory-config/MDBConfig/DeliveryActive element in MDB deployment descriptor which being set to false disable MDB starting. Than, when everything is ready, we just call MDB's MBean startDelivery method and message handling is started.
But unfortunately MQ provider for our system is IBM WebSphere MQ and we have to use WebSphere MQ Resource Adapter for enabling XA transactions. Hence we are forced to use Standard Message Inflow Driven Bean instead of Standard Message Driven Bean.
I read jboss.dtd and JBoss sources and found that there is no such an option as DeliveryActive for message-inflow-driven-bean.
Still we've got another option. Messages won't be consumed by MDB while MDB's MBean service is stopped. But to our regret MBean service for MDB is started automatically while JBoss is starting.
Is there any legal way to delay message handling with MDB?
Many thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112550#4112550
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112550
18 years, 4 months
[JBoss Seam] - Expected a child component type of UISelectItem/UISelectIte
by burakbayramli
Hi all,
h:selectOneMenu is causing problems on Seam 2.0 for some unknown reason. It used to work fine on 1.2. Here is the code.
Thanks in advance,
| <h:selectOneMenu value="#{carService.garage}">
| <f:selectItems value="#{carService.garages}"/>
| </h:selectOneMenu>
|
| @Stateful
| @Name("carService")
| public class CarServiceBean implements CarService, Serializable
| {
| ....
| List<Garage> garages;
|
| public Map<String,Integer> getGarages() {
| Map<String,Integer> map = new TreeMap<String,Integer>();
|
| garages = em.createQuery("from Garage g").getResultList();
|
| for (Garage g : garages)
| {
| map.put(g.getDescription(), g.getGarageId());
| }
| return map;
| }
| }
|
15:00:29,437 ERROR [STDERR] Dec 13, 2007 3:00:29 PM com.sun.facelets.FaceletView
| Handler handleRenderException
| SEVERE: Error Rendering View[/home.xhtml]
| java.lang.IllegalArgumentException: Expected a child component type of UISelectI
| tem/UISelectItems for component type javax.faces.SelectOne(j_id27). Found null.
|
| at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.
| java:357)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuR
| enderer.java:675)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRend
| erer.java:793)
| at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRendere
| r.java:335)
| at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:
| 836)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
| at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.
| java:812)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
| at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.jav
| a:592)
| at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePha
| se.java:106)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
| at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
| .java:83)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
| .java:69)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
| .java:69)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
| .java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter
| .java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
| lter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
| icationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
| ilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
| alve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
| alve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
| yAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
| e.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
| ava:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
| ava:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedC
| onnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
| ve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
| a:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
| :844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
| ss(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:44
| 6)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112548#4112548
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112548
18 years, 4 months