Questions tagged [weld]

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI)

Weld is the reference implementation (RI) for JSR-299: Java Contexts and Dependency Injection for the Java EE platform (CDI)

See http://seamframework.org/Weld

592 questions
0
votes
0 answers

JBoss Weld throws strange exception: getTargetClass (duplicate method)

We have a regular CDI bean where we declare a method like: @Named @ViewScoped @LoggedIn public class ComplianceRuleDocumentationManager extends BaseStatusShownDataManager { ... @Override protected Class
Kawu
  • 13,647
  • 34
  • 123
  • 195
0
votes
1 answer

Standalone JTA 1.2 and Hibernate: JPA not rolling back?

I'm using the "JBoss quickstart" tutorial described here. It demonstrates the use of distributed transactions including JPA in standalone applications. I've downloaded the code, runs fine, all test cases are green. It contains the following test…
geert3
  • 7,086
  • 1
  • 33
  • 49
0
votes
0 answers

Arquillian Weld EE NullPointerException (invoking method) EAR

I am trying to test with Arquillian + WELD EE in an (ShrinkWrap)EnterpriseArchive. But I am getting a NullPointerException when I start invoking the method. My pom.xml arquillian-weld-ee-embedded
Albert Bos
  • 2,012
  • 1
  • 15
  • 26
0
votes
1 answer

Weld ContextNotActiveException in async servlet

Environment: WildFly 9.0.1/9.0.2 Java EE 7 Full profile Weld CDI environment. Because of the number of requests I am expecting, I want to implement async request on top of the FacesServlet, and did this: public class AsyncFacesServlet extends…
maress
  • 3,533
  • 1
  • 19
  • 37
0
votes
1 answer

How to Get Updated Value from Injected Instance

A named bean, listProjects, requires authentication which is provided by the container. I want to get the username from the named loginMBean and use it in the listProjects bean. I have injected the authentication bean into listProjects, but when I…
0
votes
0 answers

How to produce a bean that need an InputStream

I try to read an Excel file with Apache POI. The project uses CDI. So i need to inject an Handler. This Handler needs a SharedStringTable as constructor parameter. So my constructor looks like this. @Inject public Handler(SharedStringTable sst) { …
Scandinave
  • 1,388
  • 1
  • 17
  • 41
0
votes
0 answers

Is it possible to use custom CDI implementation in Weblogic 12.1.1?

I have Java EE application (web and ejb modules in one ear) and OmniFaces and CDI is used in web part. Everithing fine in Weblogic 12.1.2+ versions, but i neet to deploy this app to Weblogic 12.1.1. And there is issue exists with OmniFaces and old…
Anton
  • 575
  • 2
  • 7
  • 27
0
votes
2 answers

Can't serialize (json) object because weld creates a proxy "Unrecognized field "handler"

I have many DTO classes i my project that are serialize to json to be used for rest endpoints. All extend (direct or indirect) an abstract class "Linkable" that holds the id of the objects and creates self link using injected "UriInfo". To get this…
dermoritz
  • 12,519
  • 25
  • 97
  • 185
0
votes
1 answer

Injection in custom ConnectionProvider with CDI and Hibernate4

in Java EE 7 Project i need a custom ConnectionProvider, which call DB-Function with logged UserId, and set as DB-Session variables. My Problem, I can't inject my logged User in MyConnectionProvider, but in all other Beans - without problem. This is…
jin99
  • 13
  • 4
0
votes
1 answer

IllegalAccessError in Java SE app with Weld implementation

I am trying to run a standalone app that has Weld implementation of CDI, and in that app I need EntityManager to work with Oracle database. When I run my app (via Weld main method), following is shown in cmd line: Exception in thread "main"…
Sarpy
  • 265
  • 1
  • 7
  • 18
0
votes
1 answer

Local Thread linked with RequestScope

I have a web service built with VRaptor that uses CDI (weld 2.1.2.Final). I need to parallelize some of the processing made by the server (statistical analysis of industrial alarms). I'm doing that using a ExecutorService and Callable instances,…
Rafael Teles
  • 2,708
  • 2
  • 16
  • 32
0
votes
1 answer

How to add Weld CDI support to a working Jetty application?

I am currently using Jetty 9 for deploying my WAR files. For dependency management, I'm using Gradle; my build.gradle file looks as follows: apply plugin: 'java' apply plugin: 'war' repositories { mavenCentral() } dependencies { /** *…
Jessy
  • 311
  • 4
  • 12
0
votes
0 answers

Why do @Resource + @EJB work fine for EJB style interceptors but not for CDI interceptor?

My problem is similar to @InterceptorBinding / CDI/ EJB 3.2 - problems with injection But my question is this: Why does resource / EJB injection work fine for an EJB interceptor but breaks when doing it the CDI way? Especially since EJB and CDI…
Benjamin Seiller
  • 2,875
  • 2
  • 32
  • 42
0
votes
1 answer

How can I make Weld to distinguish [@Default@Any@Named] from [@Default@Any]?

I'm using weld-se for testing one of my JSR-330 annotated class. @Inject HelloWorld any; @Inject @Named("impl") HelloWorld namedAsImpl; @Inject @Named("demo") HelloWorld namedAsDemo; @Inject @Impl HelloWorld qualifiedWithImpl; @Inject @Demo…
Jin Kwon
  • 20,295
  • 14
  • 115
  • 184
0
votes
1 answer

May I @Inject EjbService by CDI instead of by @Ejb?

Having @Stateless public class EjbService {...}, is@Inject EjbService myService; ok? Will it really inject SLSB, or it will create new pojo? Will such inserted myService be transactional? Will such inserted myService be thread safe?
bastiat
  • 1,799
  • 2
  • 19
  • 38