I have created a simple ejb that counts as a Stateful Session Bean. The Bean
is being clustered between two boxes. The server is "all" which was created
when you install 4.0.3SP1 from the jnlp. We changed the "all" to have a
different multicast port and farm deploy.
Everything works fine until I update the code and redeploy without stopping and
starting jboss. Once we redeploy, I start getting this message repeated every
~1 seconds:
anonymous wrote : 11:20:17,679 INFO [STDOUT] java.lang.NullPointerException
| 11:20:17,679 INFO [STDOUT] at
org.jboss.ejb3.cache.tree.StatefulEvictionPolicy.evict(StatefulEvictionPolicy.java:33)
| 11:20:17,679 INFO [STDOUT] at
org.jboss.cache.eviction.LRUAlgorithm.evictCacheNode(LRUAlgorithm.java:196)
| 11:20:17,679 INFO [STDOUT] at
org.jboss.cache.eviction.LRUAlgorithm.prune(LRUAlgorithm.java:271)
11:20:17,679 INFO [STDOUT] at
org.jboss.cache.eviction.LRUAlgorithm.process(LRUAlgorithm.java:54)
11:20:17,679 INFO [STDOUT] at
org.jboss.cache.eviction.EvictionTimerTask.run(EvictionTimerTask.java:37)
11:20:17,679 INFO [STDOUT] at
java.util.TimerThread.mainLoop(Timer.java:512)
11:20:17,679 INFO [STDOUT] at java.util.TimerThread.run(Timer.java:462)
I have included all the code below.
Receiver.java
package agms.ejb3;
|
| import javax.ejb.Remote;
|
| @Remote
| public interface Receiver {
|
| public int increment(int byValue);
|
| public void show(String message);
|
| }
ReceiverBean.java
package agms.ejb3;
|
| import org.jboss.annotation.ejb.Clustered;
|
| import javax.ejb.*;
| import java.io.Serializable;
|
| @Stateful
| @Clustered
| public class ReceiverBean implements Receiver, Serializable {
|
| private int count;
|
|
| public int increment(int byValue) {
| count += byValue;
| return count;
| }
|
| public void show(String message) {
| System.out.println(message);
| }
| }
|
The remote connecting code was compiled off of the same .class files that were
deployed. To run the code I have included these jars in the classpath:
jboss-4.0.3SP1\client\jbossall-client.jar
jboss-4.0.3SP1\server\all\deploy\ejb3.deployer\jboss-ejb3.jar
jboss-4.0.3SP1\server\all\deploy\ejb3.deployer\jboss-ejb3x.jar
jboss-4.0.3SP1\server\all\deploy\jboss-aop.deployer\jboss-aspect-library-jdk50.jar
Sender.java
package agms.sender;
|
| import agms.ejb3.Receiver;
|
| import javax.naming.InitialContext;
|
| public class Sender {
| SecurityManager security = System.getSecurityManager();
|
| static public void main(String[] args) {
| try {
|
| InitialContext ctx = new InitialContext();
| Receiver r = (Receiver) ctx.lookup(
| Receiver.class.getName());
|
| long time = System.currentTimeMillis();
| int value = r.increment(1);
| while (value < 10000) {
| value = r.increment(1);
| }
|
| String message = "Total time = " + (System.currentTimeMillis()
- time);
| System.out.println(message);
| r.show(message);
|
| } catch (Exception e) {
| e.printStackTrace ();
| }
| }
| }
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3918212#3918212
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3918212
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user