ejb Questions

10

Solved

I am working on a simple Java EE application. I have class like this: import javax.annotation.PostConstruct; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persist...
Ike asked 10/8, 2013 at 12:4

3

Solved

I'm using the org.slf4j.Logger in a Java EJB-Project running on a glassfish 3.1.2 server. import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class main { private static final Logge...
Crabbed asked 1/9, 2017 at 10:1

7

I have been doing Java SE for some years now and moving on to Java EE. However, I have some trouble understanding some aspects of Java EE. Is Java EE just a specification? What I mean is: Is EJB ...
Halonna asked 3/9, 2011 at 18:42

12

Solved

I've recently overheard people saying that data transfer objects (DTOs) are an anti-pattern. Why? What are the alternatives?
Diplostemonous asked 17/9, 2009 at 19:46

3

I tried to run my application (front-end developed in Java Swing, server developed with EJB deployed on Wildfly 8) with Java 9. When the client tries to establish an EJB connection got the followin...
Stephie asked 8/3, 2017 at 9:43

4

Solved

According to the Spring javadoc @Transactional(propagation = Propagation.SUPPORTS) Support a current transaction, execute non-transactionally if none exists. Analogous to EJB transaction attri...
Nette asked 27/2, 2013 at 19:1

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

6

I am mocking an abstract class like below: myAbstractClass = Mockito.mock(MyAbstractClass.class, Mockito.CALLS_REAL_METHODS); the problem is that MyAbstractClass has some dependencies injected vi...
Bibliofilm asked 21/8, 2015 at 5:42

2

Spring seems to be deprecating its RMI: As of Spring Framework 5.3, support for several remoting technologies is now deprecated for security reasons and broader industry support. Supporting infras...
Manny asked 28/5, 2021 at 8:15

9

Solved

I have found this question: What is the difference between @Inject and @EJB but I did not get any wiser. I have not done Java EE before nor do I have experience with dependency injection so I do no...
Slotter asked 15/11, 2011 at 14:52

3

Solved

I tried several ways in the session bean, like: @Resource private SessionContext ctx; OR private SessionContext ctx; @Resource private void setSessionContext(SessionContext ctx) { this.sctx =...
Historiographer asked 21/12, 2009 at 6:26

5

Solved

I am making a Web application using Backbone.js, Bootstrap, NetBeans IDE 8.0, Java EE 7, JDK 8, WildFly server 8.1.0, JBoss RESTEasy (resteasy-jaxrs-3.0.8), JBoss 2.2.22, JBoss EJB 3. I am (relati...
Otisotitis asked 15/9, 2014 at 15:16

2

I'm maintaining some older JEE code which runs fine but is using some static helper classes where an entity manager is passed in the methods from the calling EJB(s) like this: public class StaticH...
Canopy asked 9/10, 2017 at 21:35

1

Solved

@Stateless public class MyStatelessBeanA { @Resource private SessionContext sessionCtx; public byte[] methodA(){ MyStatelessBeanA myStatelessProxy1 = this.sessionCtx.getBusinessObject(MySta...
Scratchboard asked 5/11, 2019 at 16:53

1

Solved

Hi All Server : Websphere 9. Application works fine with Spring 4. We want move to Spring 5. We ran into issues with DI (Dependency Injection). We have EJB module (with Message Driven Beans)...

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

4

Solved

I am getting the exception org.hibernate.PersistentObjectException: detached entity passed to persist. From the numerous posts on this forum and elsewhere, I understand that this happens in two cas...
Adulterate asked 19/12, 2014 at 22:59

3

I'm trying to write JUnit tests for a stateless session bean that has an injected EntityManager: @Stateless public class MyServiceBean implements MyService, ... { @PersistenceContext private Enti...
Transition asked 2/2, 2012 at 13:5

5

when I try to mock following method(Method is using remote EJB call for business logic) for the Junit test, it gives javax.naming.NoInitialContextException private void someMethod(int id1, int id2...
Lycaonia asked 20/4, 2016 at 5:5

2

Solved

I have set up an EJB on Wildfly and wrote a client to access it. With the protocol "http-remoting" it works fine. Unfortunately, I am not sure about the functional details of http-remoting. I gu...
Artistry asked 23/3, 2017 at 8:39

6

Solved

Do you still use session or entity EJBs in your project? Why?
Giroux asked 20/9, 2008 at 17:18

3

Solved

i use JPA eclipse Toplink & EJB everytime i receive entity from database then change some data inside of it, database(MYSQL) automaticly change too without i commit or do something Example: ...
Thereof asked 23/9, 2014 at 0:23

8

i have created a namedquery with ejb to check if the username is used. When the singleResult is null, then i get the following Exception : javax.persistence.NoResultException: getSingleResult() di...
Chintzy asked 10/4, 2010 at 10:55

1

I have created enterprise project in eclipse . dynamic web project and ejb project has reference for enterprise project. When i running admin(enterprise project) run as selecting wildfly server 18....
Scoot asked 30/7, 2020 at 16:24

5

I am using Glassfish-bundled Eclipse IDE. I wrote a simple EJB application. but it doesn't work. @Stateless @Remote(CalculatorRemote.class) @Local(CalculatorLocal.class) public class Calculator...
Tallu asked 18/4, 2011 at 16:27

© 2022 - 2024 — McMap. All rights reserved.