[webbeans-issues] [JBoss JIRA] Created: (WBRI-283) Clustered WebBeans, no support for sessionscoped (and higher) replication
by John Ament (JIRA)
Clustered WebBeans, no support for sessionscoped (and higher) replication
-------------------------------------------------------------------------
Key: WBRI-283
URL: https://jira.jboss.org/jira/browse/WBRI-283
Project: Web Beans
Issue Type: Bug
Components: Contexts
Affects Versions: 1.0.0.PREVIEW1
Environment: JBoss AS 5.1 + JDK 6
Reporter: John Ament
Assignee: Nicklas Karlsson
>From what I can tell, this is what happens.
Assume you have a 2 node environment w/ apache httpd + mod_jk in front of the jboss servers, used to limit servers exposed + a loadbalancer (F5 ASM) in front of those. The apache servers are only configured to talk to one jboss server each (httpd + jboss are on same box, they only talk to the local client). the f5 serving the initial request is configured for pure round robin (no cookie persistence) and as a result request 1 could go to server 1 and then request 2 goes to server 2.
Now assume that the two jboss servers are clustered together, the EJBs are clustered and have a cache policy (based on the JBoss annotations). They only have local interfaces. In addition, there are some classes that are only POJOs; but they sit in the ejb module. Based on what's happening these objects should be replicated as part of the HTTP session state.
A few problems seem to occur when the request goes to the second server after the first request goes to the first server.
1. References to the resources required by the EJBs are not injected in the second server. This includes members decorated @Resource or @PersistenceContext
2. References to EJBs required at the view level are not restored.
In addition, concurrent modification exceptions seem to be more likely when deployed like this, resulting in having to downgrade EJBs to POJOs in order to remain stateful.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[webbeans-issues] [JBoss JIRA] Created: (WBRI-329) NPE in org.jboss.webbeans.ejb.SessionBeanInterceptor @PostConstruct
by Ken Saks (JIRA)
NPE in org.jboss.webbeans.ejb.SessionBeanInterceptor @PostConstruct
-------------------------------------------------------------------
Key: WBRI-329
URL: https://jira.jboss.org/jira/browse/WBRI-329
Project: Web Beans
Issue Type: Bug
Components: Enterprise Beans, Glassfish integration
Environment: 1.0.0.PREVIEW2.SP2 in 7/30/09 GlassFish V3 workspace
Reporter: Ken Saks
SessionBeanInterceptor @PostConstruct is throwing an NPE when the ejb container creates an instance of any session bean component type. The trace below is for a Singleton. These are all cases where there is no 299-specific interaction that causes the bean instance creation. It's just the ejb container creating the instance through some other path , e.g. to eagerly instantiate the Singleton during application startup or to resolve a direct JNDI lookup() from some application code. I haven't tried a stateful session bean creation via 299-apis or injection yet.
SessionBeanInterceptor.initBean() first calls (EnterpriseBean<Object>) EnterpriseBeanProxyMethodHandler.getEnterpriseBean(), which returns null.
It then calls (EnterpriseBean<Object>) CurrentManager.rootManager().getNewEnterpriseBeanMap().get(beanClass), which also returns null. That leads to the NPE on the line "this.beanId = this.bean.getId();"
SEVERE: Exception while invoking class org.glassfish.ejb.startup.EjbApplication start method
javax.ejb.EJBException: javax.ejb.CreateException: Initialization failed for Singleton SimpleSingleton
at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:689)
at com.sun.ejb.containers.AbstractSingletonContainer.instantiateSingletonInstance(AbstractSingletonContainer.java:432)
at org.glassfish.ejb.startup.SingletonLifeCycleManager.initializeSingleton(SingletonLifeCycleManager.java:93)
at org.glassfish.ejb.startup.SingletonLifeCycleManager.doStartup(SingletonLifeCycleManager.java:62)
at org.glassfish.ejb.startup.EjbApplication.start(EjbApplication.java:138)
at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:223)
at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:193)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:290)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:174)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:270)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(CommandRunnerImpl.java:422)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:437)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:524)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:140)
at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:313)
at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:180)
at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:208)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:752)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:660)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:911)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:164)
at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
at com.sun.grizzly.NIOContext.execute(NIOContext.java:510)
at com.sun.grizzly.SelectorHandlerRunner.handleSelectedKey(SelectorHandlerRunner.java:357)
at com.sun.grizzly.SelectorHandlerRunner.handleSelectedKeys(SelectorHandlerRunner.java:257)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:194)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:129)
at com.sun.grizzly.util.FixedThreadPool$BasicWorker.dowork(FixedThreadPool.java:379)
at com.sun.grizzly.util.FixedThreadPool$BasicWorker.run(FixedThreadPool.java:360)
at java.lang.Thread.run(Thread.java:637)
Caused by: javax.ejb.CreateException: Initialization failed for Singleton SimpleSingleton
at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:521)
at com.sun.ejb.containers.AbstractSingletonContainer.access$100(AbstractSingletonContainer.java:70)
at com.sun.ejb.containers.AbstractSingletonContainer$SingletonContextFactory.create(AbstractSingletonContainer.java:687)
... 37 more
Caused by: java.lang.NullPointerException
at org.jboss.webbeans.ejb.SessionBeanInterceptor.initBean(SessionBeanInterceptor.java:110)
at org.jboss.webbeans.ejb.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:62)
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:597)
at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:939)
at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:372)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:355)
at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:514)
... 39 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 4 months