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
1 answer

CDI Extension for stereotypes and proxied interfaces

I am defining a web-based generic configuration module for applications. This is the scenario use case: You have your application, that is highly configurable, so you define an interface to define the configurations for your application, and so you…
maress
  • 3,533
  • 1
  • 19
  • 37
0
votes
1 answer

Howto serialize and deserialize CDI Bean to file

I'm building a JSF application. The JSF application contains some CDI beans, which hold the session data. I want to save this session data to a file and load it at a later time. Example 1: @SessionScoped MyBean implements Serializable { private…
M.R.
  • 1,959
  • 4
  • 24
  • 32
0
votes
2 answers

CDI: Interceptor is not invoked when called from a JUnit test

I have created an interceptor following the JBoss documentation. To test the interceptor, I put: @Interceptor @Transactional public class TransactionalInterceptor { @AroundInvoke public Object intercept(InvocationContext ctx) throws Exception { …
user3151902
  • 3,154
  • 1
  • 19
  • 32
0
votes
1 answer

Using interceptor bindings from a jar

I have been searching for a while, but I can't found any information on how to achieve in Java EE to define custom annotations (interceptor bindings) to be able to be used in multiple maven modules without declaring it in every package where I would…
Dahakka
  • 247
  • 2
  • 13
0
votes
1 answer

How to merge records together

i am able to update the database so for each section a user saves it saves there work fine, in the correct column of the database, but what i am now trying to achieve is instead of saving into a new row, check there studentNumber and if it already…
user2061913
  • 910
  • 2
  • 14
  • 34
0
votes
1 answer

JSF Backing bean not called via h:commandButton, page refreshes only

I have a login page where on button submit I expect the backing bean method to be called. @PostConstruct method is called upon clicking the submit button, but the method in the backing bean (login method) is not called. No error messages are…
Chris Ritchie
  • 4,749
  • 2
  • 36
  • 33
0
votes
0 answers

CDI @Produces doesn't return value from jsf

I tried to add @Produces to my variables in my backingbean like this: @Produces @Named String selectedCustomerFirstname; and removed the getters and setters. In my xhtml page I show the value like this:
user3172567
  • 461
  • 1
  • 7
  • 19
0
votes
1 answer

Error in private access of CDI injected outer class from static inner class

I have (in a minimalistic version) the following CDI managed beans in JBoss EAP 6.0.1 @ApplicationScoped public class Outer { private final List values = new ArrayList(); public void printValues() { …
Gandalf
  • 2,350
  • 20
  • 28
0
votes
1 answer

Session replication issue between instances on Glassfish

I try to use session replication between 2 local instances (on same cluster, same node), using glassfish 4. I followed some tutorials and added following input in my web.xml file : I also checked "availability" enabled when deploying war file on my…
Saad Benbouzid
  • 502
  • 6
  • 16
0
votes
2 answers

Java EE dependency Injection when to use?

I'm new to this and I want to understand when is it appropriate to use DI in Java. Suppose I need to ping different networks with different ping parameters: The class PingParams: public class PingParams { int timeout; int retries; } The class…
dalvarezmartinez1
  • 1,385
  • 1
  • 17
  • 26
0
votes
0 answers

JSF query string parameters

I've probably completely missed something foundational here coming from a classic ASP world, but I'm completely new to JSF and Java. I can't seem to be able to append a query string to my initial page request without it generating an error. If I…
Trebor
  • 793
  • 3
  • 11
  • 37
0
votes
1 answer

CDI extension, altering processed type

Using Weld 1.1.13.Final in test with Arquillian.... Let's say I inject into a field something volatile. Something like a property subject to change that I want the bean owning the injection point to receive change events. Thought about creating a…
Matthew Campbell
  • 1,864
  • 3
  • 24
  • 51
0
votes
2 answers

What Weld CDI can @Inject without declaring a @Produces in JSF 2.1+ application?

What Weld CDI can @Inject without declaring a @Produces in JSF 2.1+ application? As I understand, it can inject FacesContext in properly set up web application. Can it inject: HttpSession? context-param from web.xml (ala…
huksley
  • 127
  • 1
  • 7
0
votes
1 answer

weld-se with StartMain not working

I am trying to make weld-se work in a very simple example, which basically follows this one. However, I can't get it work. I use gradle for building. Here is my build.gradle: apply plugin: 'java' version='1.0-SNAPSHOT' repositories { …
JBT
  • 8,498
  • 18
  • 65
  • 104
0
votes
1 answer

remove conversation id from url in weld conversationScoped

Can I hide Conversation id(cid) from url in my poroject.I use weld and my ManagedBean Are ConversationScoped.how can hide queryString from end of my url.
hasan safiary
  • 57
  • 1
  • 11