OWB picks up @SessionScoped contextual instances from expired sessions
--
Key: OWB-351
URL: https://issues.apache.org/jira/browse/OWB-351
Project: OpenWebBeans
Issue Type:
Hi!
I am developing a standalone Swing Application and trying to make use of CDI
(using openwebbeans). Also for being more fit when discussing Orchestra
related things :-)
Naturally a Swing Application consists of multiple threads. At least the main
thread and the so called Event
Hi!
I now added a really simple test which shows the problems with OWB-351.
Please be aware that this will currently break the build! But since this is a
blocker, we should get rid of those problems really soon. Thus, the more pain
the more quickly we will fix it ;)
If you like to build OWB,
Team,
OpenWebBeans provides the ResourceInjectionService API for injection
of Java EE injectable resources into CDI managed beans. This works
well and we have integrated the ResourceInjectionService API in our EE
container.
We need guidance on how OWB handles CDI managed bean injection into
Hello Rohit;
Could you look at the OWBInjector utility class? This is responsible for
injecting into EE components instances.
When EE container destroys EE component, you will also destroy creational
contexts via OWBInjector.
OWBInjector injector = new OWBInjector();
injector.inject(instance,
Hello;
That is great news, creating a maven module with webbeans-se.
In the mean time, could you look at org.apache.webbeans.boot.Bootstrap
class. Also there is a Java Swing sample, maybe you could want to look at
it, it is located in the samples/standalone-sample.
Thanks;
--Gurkan
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12855985#action_12855985
]
Gurkan Erdogdu commented on OWB-351:
In session destruction, we destroy context and
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12855987#action_12855987
]
Mark Struberg commented on OWB-351:
---
In fact the Context is really destroyed, but our proxy
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12855994#action_12855994
]
Gurkan Erdogdu commented on OWB-351:
This is problem because of not clearing
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12856000#action_12856000
]
Gurkan Erdogdu commented on OWB-351:
I have update, now test is working
OWB picks up
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mark Struberg resolved OWB-351.
---
Resolution: Fixed
OWB picks up @SessionScoped contextual instances from expired sessions
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12856075#action_12856075
]
Mark Struberg commented on OWB-351:
---
There is currently a discussion ongoing if cyclic
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12856083#action_12856083
]
Gurkan Erdogdu commented on OWB-351:
Commits on interceptor handlers eat the client
[
https://issues.apache.org/jira/browse/OWB-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12856094#action_12856094
]
Mark Struberg commented on OWB-351:
---
this got removed intentionally because it is usually
Sorry, I think we need to rollback the rollback, since this re-introduces
really heavy concurrency problems.
@SessionScoped public class User [
public String getEmail()..
}
@ApplicationScoped class MailService {
private @Inject User usr;
public void sendMail(String content) {
I'm not sure if the incompleteInstance needs to be volatile, since the creation
should only get called from one thread. In fact, we must make sure that the
Context for must allow creating a bean at a time by calling
Contextual#create(). At least for @ApplicationScoped, @Singleton,
This makes no difference, really.
The problem is that we store a CreationalContext as a member in
NormalScopedBeanInterceptorHandler. And subsequent function calls rely on it.
But if in the meantime _another_ thread overwrites this
NormalScopedBeanInterceptorHandler.creationalContext (by using
Please attach a small web application code that shows your issue. Without
it, it is very hard to visualize your siutation.
As a side note, serialization issues always a problem in Java Web
Applications. You have to manage this via synchoronization blocks or third
party other libs, for example
18 matches
Mail list logo