Questions tagged [ejb]

Enterprise JavaBeans (EJB) is a managed, server-side component architecture for modular construction of enterprise applications. The EJB specification is one of several [Java] APIs in the [Java EE] specification.

Enterprise JavaBeans (EJB) is a managed, component architecture for modular construction of enterprise applications which runs on an . The EJB specification is one of several APIs in the specification.

See also and

Tutorials

JBoss 4 EJB 3 Tutorial

JBoss 5 EJB 3 Tutorial

Video Tutorials

EJB Video Training

Reference :

Wikipedia

Oracle

6693 questions
2
votes
1 answer

How to check in EJB interceptor if the intercepted method got a RollbackException after context.proceed()?

I am currently working on an enterprise solution which is deployed as an EAR module in weblogic12c. I need to write a business logic where there will be entity manager methods which perform some updates on database using EntityManager interface with…
Zobayer Hasan
  • 2,187
  • 6
  • 22
  • 38
2
votes
1 answer

Transaction propagation in asynchronous ejb method call

We have two EJB session beans as given below; @Stateless public class MyStatelessSessionBean{ @EJB MyStatefulSessionBean statefulBean; public void methodA(){ statefulBea.methodB(); } } @Stateful @…
sauumum
  • 1,638
  • 1
  • 19
  • 36
2
votes
0 answers

@Inject - CDI failure on glassfish 4.0 at deploy

I just start with EJBs and have problem with CDI bean @Inject. At deploying and start glassfish server return error message like: deploy is failing=Error occurred during deployment: Exception while loading the app : CDI deployment failure:Error…
PDS
  • 562
  • 3
  • 13
  • 27
2
votes
2 answers

JBoss, exploded jar vs compact jar

I am working on Java 1.6, JBoss 5.1, EJB 3, and Hibernate 2. Every time I deploy the ear, if the jar is a compact one (non-exploded), application doesn't work. However when I explode the jar and then add it to the ear, the app works fine. Tried…
Win Man
  • 929
  • 2
  • 15
  • 30
2
votes
1 answer

How to design communication from a backend server to the frontend using JavaEE (EJB, JSF, PrimeFaces)

Normally, a frontend such as a web application (e.g. JSF) is used to retrieve data from a system and display it. User interaction is required: a user pulls up a website and e.g. clicks a button which in turn triggers a whole round trip process (view…
Cerbenus
  • 213
  • 3
  • 11
2
votes
1 answer

Not able to printout string variable from trycatch block on servlet http response

I am new to J2EE application and trying to display records from database after searching it by the student id which is also my primary key. jdbc/studentDB is my JNDI name. Is MY syntax @Resource(name="jdbc/studentDB") in studentdao.java enough…
Mohit Kumar
  • 500
  • 6
  • 24
2
votes
1 answer

Cannot reach EJB exposed as REST service

I'm trying to expose some EJBs as REST web service using JAX-RS annotations. When I deploy war file containing EJB Jar in WEB-INF/lib to Wildfly 8, I can see in web admin panel EJB Jar as deployed, But I cannot reach REST endpoints and get…
reith
  • 2,028
  • 13
  • 26
2
votes
3 answers

Is this valid EJB-QL?

I have the following construct in EJB-QL several EJB 2.1 finder methods: SELECT distinct OBJECT(rd) FROM RequestDetail rd, DetailResponse dr WHERE dr.updateReqResponseParentID is not null and dr.updateReqResponseParentID = ?1 …
Yishai
  • 90,445
  • 31
  • 189
  • 263
2
votes
1 answer

Is there any JavaEE architecture where business logic layer is dedicated?

Supposing a classical 3-tier JavaEE architecture like this JSF / JSP / Servlets (Web) EJB (Biz) DB (Persistence) All JavaEE tutorial examples show the web and biz layers in different containers, but in the same JavaEE server. Is there any…
Leo
  • 6,480
  • 4
  • 37
  • 52
2
votes
1 answer

LOAD and CACHE application-scoped data with @Singleton and @Stateless

I'm looking for an elegant solutions to the old problem of loading and caching static, shared data at application startup (with an infinite lifetime). My old way was a Spring Singleton Bean, but I'm trying now to achieve it with JAVA EE 6 (JPA2,…
Andrea Ligios
  • 49,480
  • 26
  • 114
  • 243
2
votes
0 answers

JavaEE and Eclipse: Setting up JPA with EAR (EJB JBA WAR)

I am trying to create an Java Enterprise Application using Eclipse IDE with JBoss 7.0 Server. I already had experience developing such applications but using NetBeans IDE. The main problem for me are the differences between these two IDEs.…
miksiii
  • 2,426
  • 26
  • 22
2
votes
0 answers

Is keeping all logic in local EJBs is good?

I have some business logic in stateless EJB, but the logic is too complex and too big for one EJB. So I can see the following things to do here: 1) Extract the logic into some helper classes and instantiate them in EJB, so EJB will be like a facade…
ALincoln
  • 431
  • 1
  • 4
  • 12
2
votes
2 answers

Exposing remote EJBs as CDI beans

Given below an example of a CDI managed bean. import javax.ejb.EJB; import javax.inject.Named; import javax.faces.view.ViewScoped; @Named @ViewScoped public class ZoneManagedBean implements Serializable { @EJB private ZoneBeanRemote…
Tiny
  • 27,221
  • 105
  • 339
  • 599
2
votes
1 answer

Datasource and EntityManager in the same Java EE Session Bean

I am using Wildfly 8.1 and Postgres 9.2 with latest jdbc driver (non XA configured) If I have a Session Bean like this: @Stateless public class MySessionBean { @Resource(lookup="jdbc/mydb") Datasource ds; @PersistenceContext // defaults to…
David Hofmann
  • 5,683
  • 12
  • 50
  • 78
2
votes
1 answer

javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean

I am trying to delete the data record of a particular candidate...locally it is working..but when I am deploying it in USA server ..it is showing…
suganya
  • 135
  • 3
  • 14
1 2 3
99
100