[JBossCache] - Re: jboss application redeployment problem
by otaylor
- Yes, if you store primitive types rather than application types this problem won't occur
- This problem won't occur with remote marshalling of the class data, since object is sent in serialized form to remote nodes. This does point out another problem you are going to run into, however, which is harder to deal with than the one you've hit already ... to get sending your application classes to remote nodes to work, you need to set the class loader that the cache uses to demarshal objects read from the wire; this isn't too hard to do - use cache.registerClassLoader() - but you can't *change* the class loader for a running cache. So you basically need to either use primitive types or restart the cache for that node (not just clear it) when you redeploy your application.
- Are you really planning to change the code on one node of the cluster while leaving an older version running on another node? Brave.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990459#3990459
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990459
18 years, 1 month
[EJB 3.0] - Re: javax.ejb.EJBAccessException: Authentication failure wit
by EricChile
Ok I added the code from the EJB 3.0 trailblazer from jboss website and I am still getting the same problem.
| javax.ejb.EJBAccessException: Authentication failure
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSe
| curityException(Ejb3AuthenticationInterceptor.java:99)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
| ationInterceptor.java:70)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
| enticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
| ptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
| usInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessCont
| ainer.java:211)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalPro
| xy.java:79)
| at $Proxy128.getFunds(Unknown Source)
| at org.apache.jsp.Calculator_jsp._jspService(Calculator_jsp.java:89)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
|
|
Notice the authentication error when trying to add funds. Exactly the same thing that the trailblazer is doing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990458#3990458
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990458
18 years, 1 month
[EJB 3.0] - Re: javax.ejb.EJBAccessException: Authentication failure wit
by EricChile
Ok I added the code from the EJB 3.0 trailblazer from jboss website and I am still getting the same problem.
| javax.ejb.EJBAccessException: Authentication failure
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.handleGeneralSe
| curityException(Ejb3AuthenticationInterceptor.java:99)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(Authentic
| ationInterceptor.java:70)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3Auth
| enticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
| ptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
| usInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
| java:101)
| at org.jboss.ejb3.stateless.StatelessContainer.localInvoke(StatelessCont
| ainer.java:211)
| at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalPro
| xy.java:79)
| at $Proxy128.getFunds(Unknown Source)
| at org.apache.jsp.Calculator_jsp._jspService(Calculator_jsp.java:89)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
|
|
Notice the authentication error when trying to add funds. Exactly the same thing that the trailblazer is doing?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990457#3990457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990457
18 years, 1 month
[JBoss Seam] - Remoting
by KoniKoni
First, sorry for my bad english!
I have followed peaces of code:
----------------------------------------------------------------------
@Stateless
| @Name("remoteaction")
| public class RemoteAction implements RemoteLocal {
| @PersistenceContext
| private EntityManager em;
|
| /*
| * @see kh.laola.remoteactions.RemoteLocal#getBets(int)
| */
| public List getBets(int Flag){
| List bets = em.createQuery("from Wette").getResultList();
| return bets;
| }
----------------------------------------------------------------------
<script type="text/javascript" src="seam/remoting/interface.js?remoteaction&wette;"></script>
----------------------------------------------------------------------
Client Site (JavaScript)
function betsCallback(result) {
| for (var i = 0; i < reuslt.length; i++){
| var xy = cast "List" to instance of XY }
| }
----------------------------------------------------------------------
I receive a result of type List and how can i cast to right type ?
THX
KoniKoni
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990452#3990452
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990452
18 years, 1 month
[JBoss Seam] - Injection at destroy time
by lowecg2004
I have some stateless beans injected into a stateful bean that are only required at destroy time. Currently when destroy is invoked, these beans are null. Code is as follows:
@Name("sessionTimeoutHandler")
| @Stateful
| @Scope(ScopeType.SESSION)
| public class SessionTimeoutHandlerHome implements SessionTimeoutHandler, Serializable
| {
| private static final long serialVersionUID = 1L;
|
| @Logger
| private Log log;
|
| @In(create=true)
| private SessionDao sessionDao; // this is stateless
|
| @In(create=true)
| private AuditLog auditLog; // and so is this
|
| private Session currentSession;
|
| ...
|
| @Remove @Destroy
| public void destroy() {
| // Session has timed out, so update the user session entry and perform
| // cleanup.
| currentSession.setClosed(new Date());
|
| sessionDao.merge(currentSession);
|
| auditLog.addAuditEntry("User session timeout for session id #0" currentSession.getId());
|
| log.info("User session timeout for session id #0" currentSession.getId());
| }
| }
Should I be getting the stateless beans injected at this point? I'm sure I've seen this working in the past.
When creating the bean I did notice what I believe to be inconsistent behaviour with respect to @Logger injection. I initially created the bean using method 1 below, by simply specifying the bean as an @Out parameter and instantiating the object within an action. Using this method, the @Logger object on SessionTimeoutHandler was null when @Destroy was called. However, when I changed to method 2 the logger was available - but still no stateless beans.
Creation Method 1 - Using @Out
| @Name("login")
| @Stateful
| @Scope(ScopeType.EVENT)
| public class LoginAction implements Login, Serializable
| {
| @Out(required=false)
| private SessionTimeoutHandler sessionTimeoutHandler;
|
|
| public String login() {
| ...
|
| SessionTimeoutHandler sessionTimeoutHandler = new SessionTimeoutHandler();
|
| // create a session timeout handler
| sessionTimeoutHandler.setCurrentSession(currentSession);
| }
| }
|
|
| Creation Method 2 - Using @In(create = true)
| @Name("login")
| @Stateful
| @Scope(ScopeType.EVENT)
| public class LoginAction implements Login, Serializable
| {
| @In(create = true)
| @Out(required = false)
| private SessionTimeoutHandler sessionTimeoutHandler;
|
|
| public String login() {
| ...
|
| // create a session timeout handler
| sessionTimeoutHandler.setCurrentSession(currentSession);
| }
| }
I am using Seam 1.1 CR2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3990451#3990451
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3990451
18 years, 1 month