[JBoss JIRA] Created: (WELD-314) Interceptors applied twice on beans when there is a decorator
by Wayne Zhang (JIRA)
Interceptors applied twice on beans when there is a decorator
-------------------------------------------------------------
Key: WELD-314
URL: https://jira.jboss.org/jira/browse/WELD-314
Project: Weld
Issue Type: Bug
Components: Interceptors and Decorators
Affects Versions: 1.0.0.GA
Environment: Os: Linux
AppServer: Glassfish v3 b73
Reporter: Wayne Zhang
Interceptors applied twice when there is a decorator. The following log is from a example application. Bean SimplePaymentService has two interceptors - AuditInterceptor and TransactionInterceptor. Also, SimplePaymentService has a decorator - SecurePaymentService. When business method pay() is called, these 2 interceptors called twice: (Example application in a NetBeans 6.8 project attached)
[#|2009-11-24T14:29:03.887+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,885 - INFO weld.lab1.interceptor.TransactionInterceptor - Start transaction for weld.lab1.service.SimplePaymentService_$$_javassist_384, instance=weld.lab1.service.SimplePaymentService@1b5adb0
|#]
[#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,887 - INFO weld.lab1.interceptor.AuditInterceptor - Method public boolean weld.lab1.service.SimplePaymentService.pay(java.lang.String,java.math.BigDecimal) throws java.lang.Exception on Bean class org.jboss.interceptor.proxy.AbstractClassInterceptionHandler$DelegatingInvocationContext invoked.
|#]
[#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.service.SecurePaymentService - I'm a secure payment service
|#]
[#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.interceptor.TransactionInterceptor - Start transaction for weld.lab1.service.SimplePaymentService_$$_javassist_384, instance=weld.lab1.service.SimplePaymentService@1b5adb0
|#]
[#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.interceptor.AuditInterceptor - Method public boolean weld.lab1.service.SimplePaymentService.pay(java.lang.String,java.math.BigDecimal) throws java.lang.Exception on Bean class org.jboss.interceptor.proxy.AbstractClassInterceptionHandler$DelegatingInvocationContext invoked.
|#]
[#|2009-11-24T14:29:03.888+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,888 - INFO weld.lab1.service.SimplePaymentService - Pay $0.03 for NetBeans.
|#]
[#|2009-11-24T14:29:03.904+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,904 - INFO weld.lab1.event.PaymentServiceListener - Payment processed: account=NetBeans, amount=0.03
|#]
[#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.interceptor.TransactionInterceptor - Transaction commited.
|#]
[#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.event.PaymentServiceListener - Payment success: account=NetBeans, amount=0.03
|#]
[#|2009-11-24T14:29:03.905+0800|INFO|glassfishv3.0|javax.enterprise.system.std.com.sun.enterprise.v3.services.impl|_ThreadID=26;_ThreadName=Thread-1;|2009-11-24 14:29:03,905 - INFO weld.lab1.interceptor.TransactionInterceptor - Transaction commited.
|#]
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (WELD-287) Unable to run example in eclipse using m2eclipse as described in documentation
by Martin Gencur (JIRA)
Unable to run example in eclipse using m2eclipse as described in documentation
------------------------------------------------------------------------------
Key: WELD-287
URL: https://jira.jboss.org/jira/browse/WELD-287
Project: Weld
Issue Type: Bug
Components: Examples
Reporter: Martin Gencur
Fix For: 1.0.1.CR1
In documentation of weld (bundled with weld), there is a chapter "7.2.1. Creating the Eclipse project" . I was able to import a wicket/numberguess example to eclipse using m2eclipse plugin, but I wasn't able to run the example. When I run src/test/java/org/jboss/weld/examples/wicket/Start.java like Run As -> Java Application, and go to http://localhost:9090/, the following output is displayed:
Nov 12, 2009 3:50:34 PM org.apache.wicket.RequestCycle logRuntimeException
SEVERE: Can't instantiate page using constructor public org.jboss.weld.examples.wicket.HomePage()
org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.jboss.weld.examples.wicket.HomePage()
at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57)
at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:299)
at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:321)
at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:915)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192)
... 26 more
Caused by: javax.enterprise.inject.UnsatisfiedResolutionException: class org.jboss.weld.examples.wicket.Game; binding types = [@Default]Unable to resolve any Managed Beans
at org.jboss.weld.BeanManagerImpl.getBean(BeanManagerImpl.java:1074)
at org.jboss.weld.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:1040)
at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:727)
at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:739)
at org.jboss.weld.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:115)
at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:51)
at org.jboss.weld.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:109)
at org.jboss.weld.wicket.util.NonContextual$Instance.inject(NonContextual.java:121)
at org.jboss.weld.wicket.WeldComponentInstantiationListener.onInstantiation(WeldComponentInstantiationListener.java:30)
at org.apache.wicket.Application.notifyComponentInstantiationListeners(Application.java:1040)
at org.apache.wicket.Component.<init>(Component.java:920)
at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:113)
at org.apache.wicket.MarkupContainer.<init>(MarkupContainer.java:105)
at org.apache.wicket.Page.<init>(Page.java:237)
at org.apache.wicket.markup.html.WebPage.<init>(WebPage.java:185)
at org.jboss.weld.examples.wicket.HomePage.<init>(HomePage.java:23)
... 31 more
When I got here: http://localhost:9090/weld-wicket-numberguess , the page displays HTTP ERROR 404 (not found)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (CDITCK-60) Use of @WebServiceRef is not portable
by Santiago Pericas-Geertsen (JIRA)
Use of @WebServiceRef is not portable
-------------------------------------
Key: CDITCK-60
URL: https://jira.jboss.org/jira/browse/CDITCK-60
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Environment: solaris x86 / JDK 16u6 / GF v3
Reporter: Santiago Pericas-Geertsen
Fix For: 1.0.1.CR1
The tests,
*.context.application.ejb.ApplicationContextSharedTest.testApplicationContextShared
*.context.application.ejb.EJBApplicationContextTest.testApplicationScopeActiveDuringCallToEjbTimeoutMethod
*.context.application.ejb.EJBApplicationContextTest.testApplicationScopeActiveDuringWebServiceInvoation
use the @WebServiceRef annotation in a non-portable way causing a failure in GF v3. The structure of the test is as follows:
----------
import javax.ejb.Local;
@javax.ejb.Local
public interface FeederService
{
public void refillFood();
public boolean adequateFood();
}
------------------------
@Stateless
@WebService
public class BirdFeederService implements FeederService
{
...
}
--------------
@Stateless
public class CommonKingfisher implements Bird
{
@WebServiceRef
private FeederService birdFeeder;
public void eat()
{
birdFeeder.refillFood();
}
--------------------
The use of @WebServiceRef is not portable because FeederService is not a JAX-WS SEI.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] Created: (CDITCK-59) EAR package is not portable
by Santiago Pericas-Geertsen (JIRA)
EAR package is not portable
---------------------------
Key: CDITCK-59
URL: https://jira.jboss.org/jira/browse/CDITCK-59
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Affects Versions: 1.0.1.CR1
Environment: Solaris x86 / JDK 6u16 / GF v3
Reporter: Santiago Pericas-Geertsen
Priority: Critical
The following TCK tests,
testInjectionOfDependentPrimitiveProductIntoNormalBean
testInjectionOfDependentSerializableProductIntoNormalBean
testNonSerializableProducerFieldDeclaredPassivatingThrowsIllegalProductException
testPassivatingScopeProducerMethodReturnsUnserializableObjectNotOk
related to the EAR,
org.jboss.jsr299.tck.tests.context.passivating.PassivatingContextTest.ear
fail with the following exception in GF v3,
attached to this wiki [1] which generates the following exception when deployed:
java.lang.RuntimeException: by java.lang.IllegalAccessError: class org.jboss.jsr299.tck.tests.context.passivating.NumberConsumer_$$_javassist_389 cannot access its superclass org.jboss.jsr299.tck.tests.context.passivating.NumberConsumer
at javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:344)
at javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:314)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:273)
at org.jboss.weld.util.Proxies.createProxyClass(Proxies.java:153)
at org.jboss.weld.util.Proxies.createProxy(Proxies.java:136)
The reason for this failure is that the WAR in the EAR above does not include a Class-Path entry in its manifest to be able to load classes from the JAR. This manifest entry is required for portability. Note that GF v3 now uses the TCCL with Javassist.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months