cdi
The difference between context and scope
Studying JSR-299, I read section 5.1 of the Weld reference which explains开发者_开发知识库 how scopes work in CDI. Apparently, context is a concept closely related to scope. The difference is not clea[详细]
2023-03-17 04:55 分类:问答Using CDI (Context & Dependency Injection) backing beans instead of Managed Beans
I rode that is recommended to use CDI beans as backing beans instead of JSF managed beans. So i decided to create a little example, to understand how it works, for a @RequestScopedBean:[详细]
2023-03-17 03:43 分类:问答Bean instance of a shorter scope injected in a bean instance of a larger scope in CDI - how does it work?
Consider the following request-scoped CDI bean: @RequestScoped public class RequestScopedBean { // ... } Now, I inject it in a application-scoped bean:[详细]
2023-03-17 01:44 分类:问答CDI session scoped bean is created only one time also if the user access from two different browser
i have a strange behaviour i\'m seeing that if the user access to session bean from two different browser, the istance of session bean is the same.In my opinion this is an unespected behaviour.[详细]
2023-03-16 04:24 分类:问答Is it possible to destroy a CDI scope?
I\'m working on a Java EE application, primarily JAX-RS with a JSF admin console, that uses CDI/Weld for dependency injection with javax.enterprise.context.ApplicationScoped objects. Minor debugging i[详细]
2023-03-15 05:02 分类:问答Why does ui:Include behavior vary with different bean scopes?
I have been tinkering around with ui:include lately and have found it to be fairly quirky in many of its behaviors.After a some testing, it seems to me like these quirks have to do with issues go back[详细]
2023-03-15 01:10 分类:问答Glassfish: Weld won't inject from classes in one jar to classes in an adjacent jar in WEB-INF/lib
I\'m having trouble using dependency injection (with CDI/Weld) within libraries used in a war when deploying on Glassfish 3.1. I have two libraries, say:[详细]
2023-03-14 09:38 分类:问答Can CDI inject remote instances of my Bean?
Can CDI inject EJB references in my remote EJB client? Actually I\'ve a JUnit test case that runs locally on my system and access a EJB running on a standalone JBoss AS.开发者_运维技巧 I\'m currentl[详细]
2023-03-13 09:43 分类:问答CDI conversation and primefaces wizard component
I just realized that my wizard component forgets the steps that lay in the past as I\'m using a @RequestScoped wizard backing bean. Using @SessionScoped will work but is ugly.[详细]
2023-03-13 09:22 分类:问答Stateful EJB with extended persistence context to handle user session
I\'m using a CDI session scoped bean to hold user related information (His user entity bean, credential, etc). I have a save method for everytime a user changes his info (like email, password, etc).[详细]
2023-03-12 17:55 分类:问答