[Persistence] - AS 5.1 - ResultSet closed, worked fine in 4.0.5
by lpmon
I have a session been that takes an SQL select query string (not EJBQL), runs the query and returns the resultset. This worked fine in 4.0.5. In 5.1.0 the resultset is open inside the session bean method but when trying to access the result set (rs.next()) in the method that called the session bean an exception is thrown saying the result set is closed. Something in either the AS or Hibernate must have changed for 5.x . ??????
More info: The session bean looks up a non-transactional JDBC datasource (regular pooled connection), creates a connection, creates a statement and executes that statement.
Again, exact same code works just fine in 4.0.5. There is no problem accessing the resultset inside the session bean it is only when you return the resultset and try to access it in the caller of the session bean that the problem occurs.
Is this a bug or have the rules changed?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259672#4259672
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259672
16 years, 8 months
[JBoss Cache Users] - HTTP Session passivation during server restart?
by RichardTaylor
I'd like to enable HTTP Session passivation so that all active sessions are passivated to disk during a graceful server restart. I'd like users to stay logged in through a server restart (single server). This is especially helpful in a development environment.
JBoss 5.1.0
JBoss Cache 3.2.1
I've read the following and have followed the instructions:
http://www.jboss.org/community/wiki/HttpSessionPassivationDesign
http://www.jboss.org/community/wiki/DistributableHttpSessionPassivation
Session passivation works in the sense that when my specified time limits are hit, sessions are written to disk. However when I gracefully shut down the server, all passivated sessions are deleted from disk.
In the section describing passivation being triggered by a server shutdown it says:
anonymous wrote : If the session is valid, then it's passivated to allow for reconstruction of the session
This implies either that my sessions are being considered invalid, a configuration issue, or possibly a bug. My HTTP session timeout is 20 minutes, so I should be fine in that regard.
Relevant configuration:
>From jboss-web.xml
<passivation-config>
| <use-session-passivation>true</use-session-passivation>
| <passivation-min-idle-time>-1</passivation-min-idle-time>
| <passivation-max-idle-time>300</passivation-max-idle-time>
| </passivation-config>
>From the http session cache section of jboss-cache-manager-jboss-beans:
<property name="cacheLoaderConfig">
| <bean class="org.jboss.cache.config.CacheLoaderConfig">
| <!-- Do not change these -->
| <property name="passivation">true</property>
| <property name="shared">false</property>
|
| <property name="individualCacheLoaderConfigs">
| <list>
| <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
| <!-- Where passivated sessions are stored -->
| <property name="location">${jboss.server.data.dir}${/}session2</property>
| <!-- Do not change these -->
| <property name="async">false</property>
| <property name="fetchPersistentState">true</property>
| <property name="purgeOnStartup">true</property>
| <property name="ignoreModifications">false</property>
| <property name="checkCharacterPortability">false</property>
| </bean>
| </list>
| </property>
| </bean>
| </property>
|
Is there a trick to getting this going? This should be possible correct?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259662#4259662
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259662
16 years, 8 months
[EJB 3.0 Users] - EJB client cannot Load Remote EJB
by pushpak1981
Hi,
We have deployed stateless EJB3 in JBoss 5.0 AS. We have written an Junit class which Does an JNDI Lookup for the EJB. But it is not able to load the remote EJB Object. We are getting following Error.
java.lang.NullPointerException
at org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:444)
at org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:56)
at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:163)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:61)
at $Proxy3.invoke(Unknown Source)
at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
at $Proxy2.addTransaction(Unknown Source)
Any help would be highly appreciated.
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259661#4259661
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4259661
16 years, 8 months