[JBoss JIRA] (JASSIST-189) Bridge methods are proxied instead of desired methods
by Donnchadh Ó Donnabháin (JIRA)
[ https://issues.jboss.org/browse/JASSIST-189?page=com.atlassian.jira.plugi... ]
Donnchadh Ó Donnabháin updated JASSIST-189:
-------------------------------------------
Issue Type: Bug (was: Feature Request)
> Bridge methods are proxied instead of desired methods
> -----------------------------------------------------
>
> Key: JASSIST-189
> URL: https://issues.jboss.org/browse/JASSIST-189
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.17.1-GA
> Environment: OS X, Java 1.7.0_09
> Reporter: Donnchadh Ó Donnabháin
> Assignee: Shigeru Chiba
>
> The following test intermittently fails:
> {code}
> package org.javassist.test.covariantproxy;
> import java.lang.reflect.Method;
> import javassist.util.proxy.MethodHandler;
> import javassist.util.proxy.ProxyFactory;
> import javassist.util.proxy.ProxyObject;
> import junit.framework.TestCase;
> public class CovariantProxyTest extends TestCase {
>
> public interface TestProxy {
>
> }
>
> public static class TestMethodHandler implements MethodHandler {
>
> boolean invoked = false;
> public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
> invoked = true;
> return proceed.invoke(self, args);
> }
>
> public boolean wasInvoked() {
> return invoked;
> }
> public void reset() {
> invoked = false;
> }
> }
> public static class Issue {
>
> private Integer id;
>
> public Integer getId() {
> return id;
> }
>
> public void setId(Integer id) {
> this.id = id;
> }
> }
>
> public static class PublishedIssue extends Issue {
>
> }
> public static abstract class Article {
>
> private Integer id;
>
> public Integer getId() {
> return id;
> }
>
> public void setId(Integer id) {
> this.id = id;
> }
>
> public abstract Issue getIssue();
> }
> public static class PublishedArticle extends Article {
>
> private PublishedIssue issue;
>
> @Override
> public PublishedIssue getIssue() {
> return issue;
> }
>
> public void setIssue(PublishedIssue issue) {
> this.issue = issue;
> }
>
> }
>
> public void testThatCallingAMethodWithCovariantReturnTypeCallsProxy() throws Exception {
> Class persistentClass = PublishedArticle.class;
> ProxyFactory factory = new ProxyFactory();
> factory.setUseCache(false);
> factory.setSuperclass(persistentClass);
> factory.setInterfaces(new Class[] {TestProxy.class});
> Class cl = factory.createClass();
> TestProxy proxy = ( TestProxy ) cl.newInstance();
> TestMethodHandler methodHandler = new TestMethodHandler();
> ( ( ProxyObject ) proxy ).setHandler( methodHandler );
>
> ((Article)proxy).getIssue();
> assertTrue(methodHandler.wasInvoked());
>
> methodHandler.reset();
>
> PublishedArticle article = (PublishedArticle) proxy;
>
> article.getIssue();
>
> assertTrue(methodHandler.wasInvoked());
>
> }
>
> }
> {code}
> Were there tests added for JASSIST-24 ? I don't see any associated source.
> This bug causes a problem in hibernate, described in https://hibernate.onjira.com/browse/HHH-7884 .
> This may be related to JASSIST-162 but the circumstances are slightly different.
> The problem occurs intermittently so it appears to depend on the order in which the methods are processed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (JASSIST-189) Bridge methods are proxied instead of desired methods
by Donnchadh Ó Donnabháin (JIRA)
Donnchadh Ó Donnabháin created JASSIST-189:
----------------------------------------------
Summary: Bridge methods are proxied instead of desired methods
Key: JASSIST-189
URL: https://issues.jboss.org/browse/JASSIST-189
Project: Javassist
Issue Type: Feature Request
Affects Versions: 3.17.1-GA
Environment: OS X, Java 1.7.0_09
Reporter: Donnchadh Ó Donnabháin
Assignee: Shigeru Chiba
The following test intermittently fails:
{code}
package org.javassist.test.covariantproxy;
import java.lang.reflect.Method;
import javassist.util.proxy.MethodHandler;
import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyObject;
import junit.framework.TestCase;
public class CovariantProxyTest extends TestCase {
public interface TestProxy {
}
public static class TestMethodHandler implements MethodHandler {
boolean invoked = false;
public Object invoke(Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
invoked = true;
return proceed.invoke(self, args);
}
public boolean wasInvoked() {
return invoked;
}
public void reset() {
invoked = false;
}
}
public static class Issue {
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}
public static class PublishedIssue extends Issue {
}
public static abstract class Article {
private Integer id;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public abstract Issue getIssue();
}
public static class PublishedArticle extends Article {
private PublishedIssue issue;
@Override
public PublishedIssue getIssue() {
return issue;
}
public void setIssue(PublishedIssue issue) {
this.issue = issue;
}
}
public void testThatCallingAMethodWithCovariantReturnTypeCallsProxy() throws Exception {
Class persistentClass = PublishedArticle.class;
ProxyFactory factory = new ProxyFactory();
factory.setUseCache(false);
factory.setSuperclass(persistentClass);
factory.setInterfaces(new Class[] {TestProxy.class});
Class cl = factory.createClass();
TestProxy proxy = ( TestProxy ) cl.newInstance();
TestMethodHandler methodHandler = new TestMethodHandler();
( ( ProxyObject ) proxy ).setHandler( methodHandler );
((Article)proxy).getIssue();
assertTrue(methodHandler.wasInvoked());
methodHandler.reset();
PublishedArticle article = (PublishedArticle) proxy;
article.getIssue();
assertTrue(methodHandler.wasInvoked());
}
}
{code}
Were there tests added for JASSIST-24 ? I don't see any associated source.
This bug causes a problem in hibernate, described in https://hibernate.onjira.com/browse/HHH-7884 .
This may be related to JASSIST-162 but the circumstances are slightly different.
The problem occurs intermittently so it appears to depend on the order in which the methods are processed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (AS7-6218) allow expressions in the infinispan subsystem
by Richard Achmatowicz (JIRA)
[ https://issues.jboss.org/browse/AS7-6218?page=com.atlassian.jira.plugin.s... ]
Richard Achmatowicz commented on AS7-6218:
------------------------------------------
An FYI: the work for this is done (in particular reworking the way property=* are processed) and expressions are being processed correctly, but I am finishing off a transformers issue. I need to combine two separate sets of transformers together into one and may not get this finished today.
But will complete before 28th next week (with holidays intervening).
> allow expressions in the infinispan subsystem
> ---------------------------------------------
>
> Key: AS7-6218
> URL: https://issues.jboss.org/browse/AS7-6218
> Project: Application Server 7
> Issue Type: Sub-task
> Components: Clustering, Domain Management
> Reporter: Jeff Mesnil
> Assignee: Richard Achmatowicz
> Fix For: 7.2.0.Alpha1
>
>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (AS7-6245) ClassNotFoundException if CMP2 entity-command is used
by Wolf-Dieter Fink (JIRA)
[ https://issues.jboss.org/browse/AS7-6245?page=com.atlassian.jira.plugin.s... ]
Wolf-Dieter Fink moved JBPAPP6-1749 to AS7-6245:
------------------------------------------------
Project: Application Server 7 (was: JBoss Enterprise Application Platform 6)
Key: AS7-6245 (was: JBPAPP6-1749)
Workflow: GIT Pull Request workflow (was: jira)
Affects Version/s: (was: EAP 6.0.1)
(was: EAP 6.0.0)
Component/s: EJB
(was: EJB)
Security: (was: Public)
Docs QE Status: (was: NEW)
> ClassNotFoundException if CMP2 entity-command is used
> -----------------------------------------------------
>
> Key: AS7-6245
> URL: https://issues.jboss.org/browse/AS7-6245
> Project: Application Server 7
> Issue Type: Bug
> Components: EJB
> Reporter: Wolf-Dieter Fink
> Assignee: Wolf-Dieter Fink
>
> If a EJB2 - CMP2 EntityBean uses an entity-command 'mysql-get-generated-keys' to generate the primary key, the server deploy with an error message:
> Caused by: java.lang.RuntimeException: JBAS018572: Could not load driver class: com.mysql.jdbc.PreparedStatement
> This may happen for different entity-commands if other databases are used!
> If the datasource module is added to the org/jboss/as/cmp modules dependencies, the startup shows:
> MSC000001: Failed to start service ... : JBAS010785: Failed start store manager
> Caused by: java.lang.RuntimeException: JBAS010732: Couldn't create entity command
> Caused by: java.lang.RuntimeException: JBAS018574: Could not load org.jboss.resource.adapter.jdbc.StatementAccess
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months
[JBoss JIRA] (JGRP-1557) SUPERVISOR: protocol to check conditions and perform corrective actions if needed
by Bela Ban (JIRA)
[ https://issues.jboss.org/browse/JGRP-1557?page=com.atlassian.jira.plugin.... ]
Bela Ban updated JGRP-1557:
---------------------------
Description:
SUPERVISOR is a protocol anywhere in the stack that passes messages up and down by default; it doesn't take part in message processing.
However, it handles events ADD_RULE / REMOVE_RULE, which adds/removes rules. A rule is a condition with a name, an interval and an (optional) action.
When the interval for a condition has elapsed, it is triggered and (if true) it'll invoke the associated action. A condition can be triggered by an interval elapsed or perhaps also when a event is received (e.g. a view change).
Example:
- Condition: check if FD is present in the stack. If it is and fd.isMonitorRunning() == false and fd.getView().size() > 1, then call action fd.startFailureDetection() and log an error message.
The error messages are stored in a bounded list, so the last N error messages can be retrieved, e.g. via probe.sh.
A rule should be able to be invoked manually, e.g. via probe.
SUPERVISOR could be configured with a file which lists the rules to be created (class name, interval, description etc) at startup.
was:
SUPERVISOR is a protocol anywhere in the stack that passes messages up and down by default; it doesn't take part in message processing.
However, it handles events ADD_ASSERTION / REMOVE_ASSERTION, which adds/removes assertions. An assertion is a condition with a name, an interval and an (optional) action. Both conditions and actions can be Runnables, but this needs to be defined later.
When the interval for a condition has elapsed, it is triggered and (if true) it'll invoke the associated action. A condition can be triggered by an interval elapsed or perhaps also when a event is received (e.g. a view change).
Example:
- Condition: check if FD is present in the stack. If it is and fd.isMonitorRunning() == false and fd.getView().size() > 1, then call action fd.startFailureDetection() and log an error message.
The error messages are stored in a bounded list, so the last N error messages can be retrieved, e.g. via probe.sh.
> SUPERVISOR: protocol to check conditions and perform corrective actions if needed
> ---------------------------------------------------------------------------------
>
> Key: JGRP-1557
> URL: https://issues.jboss.org/browse/JGRP-1557
> Project: JGroups
> Issue Type: Feature Request
> Reporter: Bela Ban
> Assignee: Bela Ban
> Fix For: 3.3
>
>
> SUPERVISOR is a protocol anywhere in the stack that passes messages up and down by default; it doesn't take part in message processing.
> However, it handles events ADD_RULE / REMOVE_RULE, which adds/removes rules. A rule is a condition with a name, an interval and an (optional) action.
> When the interval for a condition has elapsed, it is triggered and (if true) it'll invoke the associated action. A condition can be triggered by an interval elapsed or perhaps also when a event is received (e.g. a view change).
> Example:
> - Condition: check if FD is present in the stack. If it is and fd.isMonitorRunning() == false and fd.getView().size() > 1, then call action fd.startFailureDetection() and log an error message.
> The error messages are stored in a bounded list, so the last N error messages can be retrieved, e.g. via probe.sh.
> A rule should be able to be invoked manually, e.g. via probe.
> SUPERVISOR could be configured with a file which lists the rules to be created (class name, interval, description etc) at startup.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 4 months