[JBoss JIRA] Created: (EJBTHREE-720) Timeout annotation doesn't work on protected method
by Ilya (JIRA)
Timeout annotation doesn't work on protected method
---------------------------------------------------
Key: EJBTHREE-720
URL: http://jira.jboss.com/jira/browse/EJBTHREE-720
Project: EJB 3.0
Issue Type: Bug
Affects Versions: EJB 3.0 RC9 - FD
Reporter: Ilya
Priority: Minor
According to ejb3 spec:
------- ejb-3_0-fr-spec-ejbcore.pdf 18.2 (p. 484) ------------
A Timeout method can have public, private, protected, or package level access. A Timeout method must not be
declared as final or static.
---------------------------------------------------------------------------
But when I declare timeoutHandler in ExampleTimerBean as protected JBoss throws an exception:
11:39:18,271 ERROR [TimerImpl] Error invoking ejbTimeout: javax.ejb.EJBException: No method has been annotated with @Timeout
So, a testcase can be:
---------------------------------------------------------------------------
package org.jboss.tutorial.timer.bean;
import java.util.Date;
import javax.annotation.Resource;
import javax.ejb.Remote;
import javax.ejb.SessionContext;
import javax.ejb.Stateless;
import javax.ejb.Timeout;
import javax.ejb.Timer;
@Stateless
@Remote(ExampleTimer.class)
public class ExampleTimerBean implements ExampleTimer
{
private @Resource SessionContext ctx;
public void scheduleTimer(long milliseconds)
{
ctx.getTimerService().createTimer(new Date(new Date().getTime() + milliseconds), "Hello World");
}
@Timeout
protected void timeoutHandler(Timer timer)
{
System.out.println("---------------------");
System.out.println("* Received Timer event: " + timer.getInfo());
System.out.println("---------------------");
timer.cancel();
}
}
---------------------------------------------------------------------------
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Commented: (JGRP-130) Problems with reincarnation
by Bela Ban (JIRA)
[ http://jira.jboss.com/jira/browse/JGRP-130?page=comments#action_12344417 ]
Bela Ban commented on JGRP-130:
-------------------------------
Using MPING (for multicast discovery) and setting the TCP.start_port to 0 (so the operating system picks a port) might help avoiding this problem, until logical addresses are available.
> Problems with reincarnation
> ---------------------------
>
> Key: JGRP-130
> URL: http://jira.jboss.com/jira/browse/JGRP-130
> Project: JGroups
> Issue Type: Feature Request
> Affects Versions: 2.2.9
> Reporter: Bela Ban
> Assigned To: Bela Ban
> Fix For: 2.6
>
>
> Problems with reincarnation
> ===========================
> Author: Bela Ban
> Version: $Id$
> The identity of a JGroups member is always the IP address and a port. The port is usually chosen by the OS, unless
> bind_port is set (not set by default).
> Let's say a member's address is hostA:5000. When that member dies and is restarted, the OS will likely assign a
> higher port, say 5002. This depends on how many other processes requested a port in between the start and restart
> of the member.
> JGroups relies on the fact that the assignment of ports by the OS is always (not necessarily monotonically)
> *increasing* across a single machine. If this is not the case, then the following problems can occur:
> 1. Restart:
> When a member P crashes and then is restarted, if FD is used and P is restarted *before* it is excluded,
> then we have a new member *under the same old address* ! Since it lost all of its state (e.g. retransmission table),
> retransmission requests sent to the new P will fail.
> 2. Shunning:
> Regarding shunning: a member keeps its last N (default is 100) ports used, and makes sure it doesn't reuse one of
> those already-used ports when it is shunned. However, this is process-wide and *not* machine-wide, e.g. when we have
> processes P1 on A:5000 and P2 on A:5002 (on machine A), and both of them are shunned at the same time,
> when they rejoin, P1 does not use port 5000, but might use port 5002, and P2 doesn't use 5002, but might use 5000, so
> they could assume each other's identity !
> Both problems cannot be solved by remembering the last 100 ports: in case #1, this list is lost because we start a
> new process and in case #2, the list is process-wide, but not machine-wide.
> Again, these problems occur *only* when the OS reuses previously assigned ports.
> SOLUTION:
> A: Use temporary storage (per host) to store the last N addresses assigned on a given host. This makes sure we
> don't reuse previous addresses
> B: Use logical addresses, such as java.rmi.VMID or java.rmi.server.UID, which are unique over time for a given host.
> Then, it doesn't matter what ports we use because the ports are not used to determine a member's identity.
> The JIRA task for logical addresses is http://jira.jboss.com/jira/browse/JGRP-129.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months
[JBoss JIRA] Created: (JBRULES-507) jbrules docs: minor technical error in RuleBase code example
by Ivelin Ivanov (JIRA)
jbrules docs: minor technical error in RuleBase code example
------------------------------------------------------------
Key: JBRULES-507
URL: http://jira.jboss.com/jira/browse/JBRULES-507
Project: JBoss Rules
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Documentation
Affects Versions: 3.0.4
Reporter: Ivelin Ivanov
Assigned To: Mark Proctor
Priority: Minor
minor technical error in a code example:
http://labs.jboss.com/file-access/default/members/jbossrules/freezone/doc...
"
At any time Packages can be added and removed - all changes will be propated to the existing Working Memories, don't forget to call fireAllRules() for resulting Activations to fire.
ruleBase.addPackage( pkg ); // Add a package instance
ruleBase.addPackage( "org.com.sample" ); // remove a package, and all its parts, by it's namespace
ruleBase.removeRule( "org.com.sample", "my rule" ); // remove a specific rule from a namespace
"
the line
ruleBase.addPackage( "org.com.sample" ); // remove a package, and all its parts, by it's namespace
was probably meant to read
ruleBase.removePackage( "org.com.sample" ); // remove a package, and all its parts, by it's namespace
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 2 months