Most voted "ejb" questions
Enterprise Javabeans (EJB) is a component of the JEE platform that runs in a container from an application server.
Learn more…71 questions
Sort by count of
-
34
votes3
answers30862
viewsWhen to use Stateful or Stateless
I would like to know the difference and when to use. Stateful Stateless
-
12
votes2
answers1221
viewsSpring Security with Java EE
Hello, I am developing a Maven Enterprise Application EAR project and am currently implementing the authorization part using Spring Security with Annotation instead of xml. Structure of the Project:…
-
9
votes1
answer5156
viewsWhat is the difference between @Inject and @EJB when injecting an EJB?
I have an EJB that relies on another EJB, so I’m going to use dependency injection to satisfy that dependency. My question is: what is the difference, advantage or disadvantage between @Inject and…
-
7
votes2
answers455
viewsJAX-RS Resource as Session Bean or CDI Managed Bean?
Today I ran into an interesting problem trying to inject an EJB into a JAX-RS feature (in Glassfish 4.1, running the pre-installed version of Jersey). @Stateless public class MeuEJB implements…
-
6
votes2
answers1478
viewsEntitymanager with JTA multiple connections
I’m having a bit of an unusual problem, but I’m looking for a solution. I have a scenario where I have several databases (postgresql) allocated in several clients, all databases have the same…
-
6
votes1
answer694
viewsDivision of the EJB Project
I have an EJB project, to implement the system the project needs to be divided into 3. The Database on a machine The User Interface on another host And the EJB(Services) in another But the whole…
-
6
votes3
answers10207
viewsWhat is the JBOSS?
I’m reading a book about distributed applications and he occasionally references Jboss. I would like to know what it consists of and its usefulness?
-
5
votes2
answers350
viewsFetchtype.EAGER for Fetchtype.LAZY
I have the following problem, the whole system uses a relation, Eager, but for a specific query I do not want to bring all relations in the bank, because it would be too heavy the process, only for…
-
5
votes3
answers5197
viewsDefinition of EJB
Forgive me for the general subject, but I have been researching for some time in various places and I have found nothing that would explain satisfactorily what an EJB is and what it is for. I am…
-
5
votes1
answer230
viewsSpring and EJB have the same features?
Spring and EJB have the same features? If not, you can use both in the same application?
-
5
votes1
answer201
viewsError when deploying lambda EJB project using glassfish 4
I have in my project two java files First.java. package br.com.bom; import javax.ejb.Stateless; @Stateless public class Primeiro { } Second java. package br.com.bom; import javax.ejb.Stateless;…
-
4
votes0
answers149
viewsEnterprise Application Project dependency problem
I’m having trouble with a java project ee. (Enterprise Application Project). I’m using wildfly-8.0.0.Beta1 server. The structure of my project is as follows:: I already put the EJB Project in the…
-
4
votes1
answer702
viewsHow to properly reuse business rules using Ejbs?
I am refactoring a system where the greatest concern is to decrease the coupling and complexity of the various levels of inheritance, so the examples are illustrative. I have the entities Contrato,…
-
4
votes1
answer396
viewsXA transaction does not commit changes in procedures (intermittent)
I have an EJB Stateles that monitors files that fall into a folder. When a file arrives it is handled, a receiving event is recorded in a central database and the file is inserted into a target…
-
4
votes1
answer512
viewsCan injecting dependencies into an EJB builder cause modularization and performance problems?
Recently I migrated from Spring to CDI + EJB, I tried to inject my dependencies directly into the constructor as I did in Spring and as it is supported by CDI but in an EJB: @Stateless public class…
-
4
votes0
answers136
viewsStackoverflowerror - Infinite loop when deploying Ear with ejb and Demoiselle
By doing the deploy an EAR with an EJB that depends on the Demoiselle-core, an exception to Stackoverflowerror is launched. It happens that when trying to create a Resourcebundle…
-
4
votes2
answers252
viewsScope equivalent to @Stateless on CDI
I’m migrating the notes EJB from my application to CDI and I have some doubts: What is the equivalent scope @Stateless of the EJB at the CDI? The @ResquestScoped would act in an equivalent manner? I…
-
3
votes2
answers451
viewsSpecifying an EJB-client with Maven
I am unable to use the interfaces of an EJB-client generated by Maven. I have basically two separate projects with different functions. An EAR containing EJB’s and a WAR using EJB’s interfaces from…
-
3
votes2
answers50
viewsBusiness Exception is not in the Clientejb classpath
I have the following situation: EJB PROJECT public BussinessException extends Exception {} public MyInterfaceImplementation implements MyInterface {} EJB PROJECT CLIENT public interface MyInterface…
-
3
votes1
answer220
viewsCompetition problem in java web application
Good evening, everyone, See the following code: Controller @WebServlet("/testConcurrency") public class TestConcurrency extends HttpServlet { private static final long serialVersionUID =…
-
3
votes2
answers1142
viewsConvert and Validator with CDI injection
Can someone inject CDI or EJB into JSF 2.2 Converter or Validator? It was said that from 2.2 it would be possible but I’m not getting it. I’ve tried to @EJB UserService userService and also @Inject…
-
3
votes1
answer570
viewsServlet Container (Tomcat) or Application Server?
I am currently developing a project that uses JSF, JPA, CDI and EJB. I read in several places where they said that Tomcat (Servlet Container) does not have support for these technologies, but…
-
3
votes1
answer597
viewsHow to consume a message from a remote MQ queue using MDB on Jboss servers
I have an EJB class that writes a message in a JMS queue and would like to consume this message from a Messagedrivenbean (MDB) installed on another server. My class successfully writes in the JMS…
-
2
votes1
answer203
viewsHow to intercept only the public methods of a bean Managed?
If you have a managed bean ( @Managedbean annotation), how would it be possible to intercept only the public methods of this bean? The motivation for this would be as follows, suppose you have a…
-
2
votes1
answer39
viewsHow to change the life cycle of the Maven?
I have an EJB project and would like to run the test after deploying my Air. Because I have a test on the ejb layer, which needs to access the ejbstubs inside the server(was), before I did it with…
-
2
votes1
answer63
viewsWhat is the difference between Sessions Beans and Message Drivebeans?
There are two components responsible for business logic in the EJB architecture, the Session Beans and Message Drivebeans. I would like to know the difference of both and some example of their use.…
-
2
votes0
answers78
viewsInject EJB in Bean Spring
I’m working on a Java EE + Primefaces + JPA project with EJB. In the authentication part I decided to use Spring Security, but I’m having a hard time getting the EJB inside the Spring controller. I…
-
2
votes1
answer475
viewsError javax.naming.Noinitialcontextexception - console application
I’m trying to make a simple EJB, followed some tutorials, analyzed the Wildfly sample code, and yet, I’m facing an error. Could someone help me? The mistake:…
-
1
votes1
answer180
viewsIs it safe to trust the security of an application to Spring Security?
I am developing a fairly simple but widely distributed system that involves including use of Ejbs and other agents, which requires both Authentication and Authorization. The system will initially…
-
1
votes1
answer32
viewsExcess EJBS in Managedbean
Good morning, I have a question as to how the Container works in the injection of the EJBS will be that the quantity of EJBS injected in Managedbean can significantly interfere in the performance of…
-
1
votes0
answers67
viewsRun a Scheduler instance in a clustered environment
I have a project EJB that records a record in the database every 5 minutes. For this I am using the annotation @Schedule. For the cluster to work, I need to upload the application to the two nodes…
-
1
votes0
answers339
viewsSave image to the application folder (File upload) using EJB+Servlet JSP
Good people? I need an example of how to upload the file using the technologies, EJB+Servlet+JSP... I am working on a project that needs to insert the images dynamically in my application. Hugs!…
-
1
votes0
answers89
viewsHow do Java annotations work?
I would like to know how EJB annotations are made in Java, those that start with "@"
-
1
votes0
answers311
viewsProblem with Widfly
I am having an error starting the library project with Widfly 10. Until the part connecting with the bank was working, agr when connecting with mysql am having problems. I’ve already set up the…
-
1
votes3
answers3382
views -
1
votes0
answers49
viewsError when Injecting DAO EJB
I have an EJB project built with JDK 7. Currently in production we use Glassfish-3.1 as an application server and we are trying to migrate it to Payara-4.1. We were able to upload the application…
-
1
votes1
answer1618
viewsjava.lang.Classnotfoundexception: Could not load requested class : com.mysql.jdbc.Driver
I have a Dynamic Web Project in Eclipse and have been constantly receiving this error: java.lang.Classnotfoundexception: Could not load requested class : com.mysql.jdbc.Driver. My persistence.xml…
-
1
votes1
answer172
viewsHow do I inject Ejbs that call other Ejbs into a Junit test class?
I’m trying to test a class in Junit. Turns out the class I’m testing has several Ejbs that call other Ejbs. How do I inject into a Junit EJB’s test class called other EJB’s? Thank you.…
-
1
votes1
answer55
viewsJakartaee vs Spring vs Java SE with JPA
Speak for me, baby? Reading the Oracle documentation I found the following excerpt: @Persistencecontext protected Entitymanager entityManager; Hence the EJB container will inject a standard Unit…
-
1
votes0
answers38
viewsDoubt Jboss Data Virtualization
Good evening, I am with a project where I have to consume tables generated in star format, for use of BI, the company bought a paid tool, but do not want to spend much on licenses. Therefore a user…
-
1
votes0
answers68
viewsproblems creating timer on EJB
Good night, you guys, I’m having trouble creating a timer, I have no previous experience with applications that run this way. error happens in Cargadados class. follows the timer code:…
-
1
votes1
answer206
viewsConvert EJB and WEB modules to Maven
My project consists of three modules: EAR, EJB and WEB. I know Maven goes way beyond dependency control, but to start I just want to use it to control dependencies. I tried to convert the modules…
-
1
votes0
answers146
viewserror while trying to upload application using Wildfly
I am learning EJB, and I received a project that uses EJB, only that I decided to use Wildfly. when I upload application presents an error. service…
-
1
votes1
answer77
viewsCreating Ejbs in Spring MVC Project - Problems with Dependency Injection
I have a Java application with Spring MVC that is divided into modules as follows. proj_servicos = Mapped entities, Repository classes (communication with the bank) and Services (Where Repository is…
-
1
votes0
answers97
viewsDAO not injecting with @EJB Annotation
I’m making a requisition for "/counter/{id}" by Postman and when the code arrives in notifiedAAO.counter(id), I get the error message saying that notifiedDAO is null. PS: I’m using Wildfly 11 with…
-
0
votes1
answer1079
views"Lookup failed" error when using a Glassfish Custom Resource
I’m using a Custom Resource of Glassfish to save a property: There, I’m trying to take this amount like this: new InitialContext().lookup("javax.faces.PROJECT_STAGE") but I get the following…
-
0
votes1
answer295
viewsHow to add a new Runnable to an Executorservice?
This is the first time I’ve worked with threads... The method below runs every 15 seconds by the EJB. I wanted that if there is SMS list in the bank it add to a new thread triggering these SMS But…
-
0
votes1
answer149
views -
0
votes1
answer300
viewsWhat is the endpoint interface in EJB?
I am studying EJB(Enterprise Java Beans) and would like to know, within the context of distributed applications, what is the role of the endpoint interface. What is the endpoint interface? Where and…
-
0
votes0
answers370
viewsError accessing Websphere database
This error appears after installing the project(it installs everything normal and even runs and opened the project, but when it will access a page that makes the request to the error database):…