[Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
by chillal.kishor
Yes, I created HttpSessionAttributeListener. It is displaying the names and values what ever i set in the session. In my case i am setting 2 things in the session in login page.
1. DMSession class which extends UserSession class which implements serializable.
2. A boolean variable in the DMSession's object as true.
There is only HTML code to take user id and password for inputs.
I started all on 8080 and node1 on 8180...Started nicely. Tested web-console displays both when refreshed.
when i say localhost/timbermine, First request goes to all server. Value of boolean set in the session is true....
and when i enter details and submit, the second request goes to node1 now the value of boolean variable is false in node1 since the first request goes to all server.....and displays the following error in node1....
The boolean variable i am setting in the session is not replicating in the node1...
In this first 2 lines are the values set in the session..
10:21:23,976 INFO [STDOUT] [Sess Add] javax.servlet.http.HttpSessionBindingEvent[source=org.apache.catalina.session.StandardSessionFacade@9212f4]: session_manager=dm.web.utils.DmWebSession@1a755e
10:21:23,992 INFO [STDOUT] [Sess Add] javax.servlet.http.HttpSessionBindingEvent[source=org.apache.catalina.session.StandardSessionFacade@9212f4]: ISFROMLOGIN=true
10:21:24,039 INFO [STDOUT] java.io.NotSerializableException: org.apache.catalina.session.StandardSessionFacade
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
10:21:24,039 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
10:21:24,054 INFO [STDOUT] at java.util.HashMap.writeObject(HashMap.java:978)
10:21:24,054 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
10:21:24,054 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
10:21:24,054 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
10:21:24,054 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:324)
10:21:24,070 INFO [STDOUT] at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
10:21:24,070 INFO [STDOUT] at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
10:21:24,085 INFO [STDOUT] at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
10:21:24,085 INFO [STDOUT] at org.jboss.invocation.MarshalledValue.(MarshalledValue.java:57)
10:21:24,085 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.getMarshalledValue(JBossCacheService.java:538)
10:21:24,101 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheService.putSession(JBossCacheService.java:155)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.SessionBasedClusteredSession.processSessionRepl(SessionBasedClusteredSession.java:161)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.processSessionRepl(JBossCacheManager.java:475)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.JBossCacheManager.storeSession(JBossCacheManager.java:256)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.InstantSnapshotManager.snapshot(InstantSnapshotManager.java:38)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:91)
10:21:24,117 INFO [STDOUT] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
10:21:24,117 INFO [STDOUT] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
10:21:24,117 INFO [STDOUT] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
10:21:24,117 INFO [STDOUT] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
10:21:24,117 INFO [STDOUT] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
10:21:24,132 INFO [STDOUT] at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:307)
10:21:24,132 INFO [STDOUT] at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:385)
10:21:24,132 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:748)
10:21:24,132 INFO [STDOUT] at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:678)
10:21:24,132 INFO [STDOUT] at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:871)
10:21:24,148 INFO [STDOUT] at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
10:21:24,148 INFO [STDOUT] at java.lang.Thread.run(Thread.java:534)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038710#4038710
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038710
19 years
[Persistence, JBoss/CMP, Hibernate, Database] - How to recover from database restart while JBoss is running.
by bertnz
Hi all,
Excuse me for being a bit green in the J2EE world but I have a JBoss server (3.2.5) running a J2EE application which uses jdbc/Hibernate/Sql Server/Quartz/JBossMQ JMS.
All works fine until the database this application is talking to crashes (or is reset by me).
At the time of the crash (or reset) I understand why I get big errors in my console.
However once I restart my sql server JBoss doesn't recover at all. It looks to me as if the connection pool in just keeps allocating connections from memory which have all been closed by the server crashing.
When I look at my activity for the DB JBoss has no connections to the DB at all and my scheduler (Quartz) keeps throwing these exceptions:
java.sql.SQLException: Invalid state, the Connection object is closed
Surely whatever is pooling these connections should be smart enough to handle an unexpected DB shutdown?
If someone can point me in the right direction here that would be great.
cheers
Robert Hughes
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038708#4038708
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038708
19 years
[JBoss Seam] - Re: Seam and Richfaces : Drag and Drop Problem
by hispeedsurfer
Hi,
have the same problem.
| javax.faces.el.MethodNotFoundException: /specialreleaseeditor.xhtml @107,140 dropListener="#{requestlist.processDrop}": Method not found: RequestListBean:5c4o1y-w4tnnw-f0o94j20-1-f0opgfby-1s.processDrop(org.ajax4jsf.dnd.event.DropEvent)
|
@stu2
What your DanD inferface looks like?
| @Stateful
| @Scope(ScopeType.CONVERSATION)
| @Name("requestlist")
| @SuppressWarnings("unchecked")
| public class RequestListBean extends AbstractChildListBean<Request, SpecialRelease> implements
| RequestList {
| public void processDrop(DropEvent dropEvent) {
| Dropzone dropzone = (Dropzone) dropEvent.getComponent();
|
| }
|
| }
|
| package de.bosch.ecp.business;
|
| import java.util.List;
|
| import javax.ejb.Local;
|
| import org.ajax4jsf.dnd.event.DropEvent;
| import org.ajax4jsf.dnd.event.DropListener;
|
| import de.bosch.ecp.abstracts.AbstractChildList;
| import de.bosch.ecp.model.Request;
| import de.bosch.ecp.model.SpecialRelease;
|
| @Local
| public interface RequestList extends AbstractChildList<Request, SpecialRelease>{
| public void processDrop(DropEvent dropEvent);
| }
|
|
If I implement DropListener in RequestlistBean problem is the same as well.
Use jboss-seam-1.2.1.GA seam-gen,
ajax4jsf-1.1.1-SNAPSHOT.jar
richfaces-3.0.1-20070414.000828-14.jar
tomahawk-1.1.5-SNAPSHOT.jar
in WEB-INF\lib folder
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038705#4038705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038705
19 years
[EJB/JBoss] - sample hello world application
by Narasimha
I am a beginner. I want to start with a hello world application.
at this point i made the following :
a>business interface
b>bean
c>test client
a>firstInterface.java
package server;
import javax.ejb.Remote;
@Remote
public interface firstInterface
{
public String hello();
}
b>firstBean.java
package server;
import javax.ejb.Remote;
import javax.ejb.Stateless;
@ Stateless
@ Remote(firstInterface.class)
public class firstBean implements firstInterface
{
public String hello()
{
System.out.println("hello()");
return "hello world !";
}
}
c>firstTestClient.java
package client;
import javax.naming.Context;
import javax.naming.InitialContext;
import server.firstInterface;
public class firstTestClient {
/**
* @param args
* @throws Exception
*/
public static void main(String[] args) throws Exception
{
// TODO Auto-generated method stub
Context ctx = new InitialContext();
firstInterface fInterface = (firstInterface) ctx.lookup("server/firstInterface");
System.out.println(fInterface.hello());
}
}
i have no idea as what to do further. I do not know the flow. for instance what all xml files do i need to generate and esentially how do i deploy the bean.
i realy appreciate if you guys could help me out.
thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038700#4038700
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038700
19 years