ejb-3.1 Questions

3

Solved

Can I (and if so, how?) lookup CDI managed beans using javax.naming.Context#lookup in EJB module? I'm using GlassFish v3. I suppose that I can use @Named, but what is JNDI name of CDI managed bean...
Stoss asked 17/11, 2011 at 11:16

3

I have EJBs in EJB 3.1 which I am trying to deploy in JBoss EAP 6, but when I start the server. It appends version no in JNDI names as shown below. 18:27:57,068 INFO [org.jboss.as.ejb3.deployment...
Dyanna asked 23/3, 2016 at 10:36

5

Solved

Been trying to learn what EJB beans are, what does it mean their instances are managed in a pool, blah blah. Really can't get a good grip of them. Can you explain me what they really are (practica...
Pogy asked 13/10, 2012 at 11:31

6

I'm working with RestEasy, Jboss 7 and EJB 3.1. I'm creating a RESTful web service that returns data in JSON format. The problem is that I have a @ManyToOne relationship on one of my entities whic...
Goal asked 2/6, 2013 at 9:16

2

Solved

I am trying to persist the entity with constraint validation, when invoke persist - there is constraint that thrown and the caller get EjbTransactionRolledbackException... so I try to call the vali...
Stagy asked 25/9, 2010 at 11:45

4

Solved

I created a Java Web Application Project in NetBeans, and created a startup bean in it: package malibu.util; import javax.annotation.PostConstruct; import javax.ejb.EJB; import javax.ejb.Stateles...
Antedate asked 25/7, 2011 at 18:48

3

Solved

If I have nested bean methods which just fetching data from the database. (i.e GET API). So will it be beneficial to mark all bean methods as TransactionAttributeType.NOT_SUPPORTED? Will it help in...
Registered asked 24/5, 2017 at 13:26

3

Solved

I am using weld,a RI of CDI as dependency injection component in my JSF-EJB-JPA web app. I see in my project we have empty beans.xml in META-INF/beans.xml in ejb.jar and WEB-INF/beans.xml in my WAR...
Mendes asked 8/8, 2013 at 16:26

6

My Java EE 6 application consists of a war and an ejb module packaged in ear file. I'm using CDI for DI (i.e. I have a beans.xml file in both modules). I want to use a logging interceptor that is d...
Lieutenant asked 29/10, 2010 at 10:43

1

Solved

According to the Java EE 6 Tutorial: The EJB container is responsible for determining when to initialize a singleton session bean instance unless the singleton session bean implementation class ...
Coco asked 28/4, 2019 at 19:54

2

Solved

PostgreSQL 9.1 Glassfish 3.1.2.2 Firefox 10.0.0.7 Linux I am using JPA to persist entities in PostgreSQL. However, there is one table (named Position) which is populated by triggers and I use an ...
Primp asked 14/11, 2012 at 23:37

7

Solved

I am going through the Java EE 6 tutorial and I am trying to understand the difference between stateless and stateful session beans. If stateless session beans do not retain their state in between ...
Extensive asked 28/2, 2010 at 13:52

3

Solved

NOTE: Adding this question in short form with an answer after spending far more time than I'd like to admit on finding the cause. Hopefully I'll save someone else some pain. When delegating a meth...
Whitford asked 18/10, 2012 at 6:6

3

Solved

I'm running Glassfish 3.1-SNAPSHOT as of today (2010-11-12). I'm using the embedded EJBContainer. On the classpath, as reported by the EJBContainer, I have a META-INF/persistence.xml. This file d...
Hyperon asked 12/11, 2010 at 17:58

3

Solved

I'm trying to use the Timer Service in EJB 3.1 in my app. @Stateless @LocalBean public class StatelessTimerSessionBean { @Schedule(minute = "*", second = "0", dayOfMonth = "*", month = "*", year...
Skell asked 8/11, 2012 at 15:47

4

Solved

In EJB 3.1 I can get all timers for a specific bean using TimerService#getTimers() on the TimerService instance obtained for that bean. What I actually need however is a system-wide version of thi...
Foppery asked 25/12, 2010 at 12:38

3

Solved

When we use persistent EJBTimer with @schedule and persistent=true, deploy it to cluster and then we change the actual schedule within @Schedule and re-deploy to the cluster, does the original sche...
Avitzur asked 11/2, 2015 at 17:59

2

I have an EJB application and used EJB Timer to place some tasks(persisted database sequence ID) with expire date/time on it and once time expires remove the tasks from the Timer and invoke some me...
Fluorine asked 6/2, 2014 at 21:34

0

I have been looking into section 3.4.7.2 of the EJB3.2 specifications lately und done some tests. The specifications: @EJB Cart cart1; @EJB Cart cart2; … if (cart1.equals(cart1)) { // this t...
Story asked 2/8, 2017 at 12:4

2

I have two Wildfly 10.1.0 Final server running on the same machine. Each has the same application deployed but for different clients. Each server is also configured to use Inifinispan 8.2.4 as a se...
Asquith asked 11/4, 2017 at 14:55

2

Solved

There appears to be some inconsistency on how to use JMS resources, and setting up activationConfig with proper @ActivationConfigProperty on a @MessageDriven annotation. First, here is my resource...
Daniels asked 25/8, 2015 at 19:34

1

I want to get bean from producer method in order to read its properties. In some scenarios the bean is a EJB Singleton bean. I've simplified my code to focus on the problem. My simple qualifier:...
Densify asked 6/1, 2016 at 22:9

4

Solved

I want to write a back-ground job (EJB 3.1), which executes every minute. For this I use the following annotation: @Schedule(minute = "*/1", hour = "*") which is working fine. However, sometime...
Excide asked 18/1, 2013 at 15:26

1

Solved

In the context of a Java EE 6 application run on WebSphere 8.0, I need to execute a number of startup tasks before any business method can be executed. Using a @Startup, @Singleton bean for this pu...
Quintessence asked 22/9, 2016 at 16:11

4

According to clean code by Robert C. Martin methods should have a small signature. The best case would be a method with no parameters at all. Instead it is recommended to use state variables. This ...
Degrade asked 24/4, 2012 at 14:3

© 2022 - 2024 — McMap. All rights reserved.