[JBoss JIRA] Created: (WELDX-74) Support use of decorator of Callable<T>
by Elias Ross (JIRA)
Support use of decorator of Callable<T>
---------------------------------------
Key: WELDX-74
URL: https://jira.jboss.org/jira/browse/WELDX-74
Project: Weld Extensions
Issue Type: Feature Request
Components: Java SE
Reporter: Elias Ross
Decorator exists for Runnable. Should allow for Callable<T> to be used as well.
This is actually pretty useful, for example if you want to execute under a temporary new scope in the same thread, e.g.
@Inject Instance<PaymentProcessor> paymentProcessorSource; // which implements Callable<Result>
Result result = paymentProcessorSource.get().call();
Or, in the case of a thread pool, you can use Future<T> etc.
/**
* Decorator for all beans which implements Callable. It intercepts the call
* to the call() method to set up the ThreadContext for the new thread so that
* instances of @ThreadScoped beans can be correctly resolved.
*/
@Decorator
public class CallableDecorator<T> implements Callable<T> {
@Inject @Delegate Callable<T> callable;
/**
* Set up the ThreadContet and delegate.
*/
public T call()
{
// set up context for this thread
final ThreadContext threadContext = WeldSEBeanRegistrant.THREAD_CONTEXT;
threadContext.setBeanStore(new HashMapBeanStore());
threadContext.setActive(true);
// run the original thread
try {
return callable.call();
} finally {
threadContext.destroy();
}
}
--
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
12 years, 10 months
[JBoss JIRA] Created: (WELDX-38) ConversationScoped not working on Tomcat
by Fabio Wang (JIRA)
ConversationScoped not working on Tomcat
----------------------------------------
Key: WELDX-38
URL: https://jira.jboss.org/jira/browse/WELDX-38
Project: Weld Extensions
Issue Type: Bug
Components: Servlet Containers
Affects Versions: Servlet Containers 1.0.0.CR1
Environment: Apache Tomcat 6.0.20
Reporter: Fabio Wang
Trying to mark a conversation as long-running causes an exception (java.lang.NoClassDefFoundError: javassist/util/proxy/ProxyObject) when the ServletConversationManager tries to get a proxy for the httpSession.
The ProxyFactory.classLoaderProvider ends up resolving the classloader to an instance of org.apache.catalina.loader.StandardClassLoader (which doesn't know the javassist lib, since it's only in the app classloader).
--
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
12 years, 10 months
[JBoss JIRA] Created: (CDITCK-73) Test abstract decorators functionally
by Marius Bogoevici (JIRA)
Test abstract decorators functionally
-------------------------------------
Key: CDITCK-73
URL: https://jira.jboss.org/jira/browse/CDITCK-73
Project: CDI TCK
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 1.0.0.GA
Reporter: Marius Bogoevici
Fix For: 1.0.1.CR1
The current assertions for abstract decorators are just testing that abstract classes annotated with decorators can be enabled and are resolved correctly. However, no functionality test involving abstract decorators is carried out.
The assertions should test that:
a) abstract decorators can be applied at all (i.e. instantiated)
b) methods which are not decorating methods of the decorated type cannot be abstract (DefinitionException)
c) when abstract decorating method are called as part of the decorator chain, they are actually deferring the call to the injected delegate
--
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
12 years, 11 months
[JBoss JIRA] Created: (CDITCK-61) Some tests have dependencies with jsr299-tck-api.jar and jsr299-tck-impl.jar
by Santiago Pericas-Geertsen (JIRA)
Some tests have dependencies with jsr299-tck-api.jar and jsr299-tck-impl.jar
----------------------------------------------------------------------------
Key: CDITCK-61
URL: https://jira.jboss.org/jira/browse/CDITCK-61
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Affects Versions: 1.0.1.CR1
Environment: Solaris x86 / JDK 16u6 / GF v3
Reporter: Santiago Pericas-Geertsen
We have found that certain TCK test load classes from jsr299-tck-api.jar and jsr299-tck-impl.jar, but these jars are not normally included in the generated application bundles. An example of such a test is:
*.deployment.packaging.installedLibrary.WarInstalledLibraryTest.test
which looks for:
org/jboss/jsr299/tck/tests/deployment/packaging/installedLibrary/Bar
This test fails with GF as these classes are not available to applications. Should jsr299-tck-api.jar and jsr299-tck-impl.jar be bundled with apps? (We can provide a complete list of tests that depend on these TCK jars if needed).
--
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
12 years, 11 months