Questions tagged [session-bean]

A session bean encapsulates business logic that can be invoked programmatically by a client over local, remote, or web service client views.

To access an application that is deployed on the server, the client invokes the session bean’s methods. The session bean performs work for its client, shielding it from complexity by executing business tasks inside the server.

96 questions
20
votes
6 answers

JBoss: What does the warning EJBTHREE-1246 from the InterceptorRegistry mean?

I am currently developing an EJB 3.0 based application on the JBoss AS 5.0.0.GA and just recently the following warning showed up in the server log: 09:50:19,735 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a…
Simon Lehmann
  • 10,737
  • 4
  • 41
  • 53
11
votes
3 answers

Why not use Session Beans instead of Message Driven Beans?

I'm wondering, why not use Session Beans instead of Message Driven Beans ? If you can call remote methods from EJBs, so why bother sending/receiving messages with Message Driven Beans (which is more difficult to develop than session beans) ? In…
mohamida
  • 804
  • 2
  • 11
  • 25
8
votes
3 answers

Handling stack traces with unknown exception classes

I'm implementing a session bean that throws ApplicationExceptions. These exceptions have chained stack traces that may contain exceptions whose classes aren't available on the client. Something like: @Override public void…
boskop
  • 609
  • 5
  • 23
7
votes
1 answer

EJB 3 Session Bean Design for Simple CRUD

I am writing an application that's sole purpose in life is to do CRUD operations for maintaining records in database. There are relationships between some of the tables/entities. Most examples I've seen for creating session beans deals with…
sdoca
  • 7,832
  • 23
  • 70
  • 127
6
votes
3 answers

Static variables restriction in session beans

It's impossible to use static variables on a session bean code. Is this restriction arbitrary or fundamented? And why? Best regards
thathashd
  • 1,022
  • 4
  • 17
  • 49
4
votes
3 answers

What is the preferred way to use EJBs and Servlets for web applications?

I am trying to familiarize myself with JavaEE. I am a bit confused as to what the purpose of each "component" (for lack of a better word) is: Session Beans and Servlets, and how they properly interact with a web application (client-side…
Level9000
  • 73
  • 2
  • 4
4
votes
3 answers

Simple but good pattern for EJB

What would you suggest as a good and practical but simple pattern for a solution with: HTML + JSP (as a view/presentation) Servlets (controller, request, session-handling) EJB (persistence, businesslogic) MySQL DB And is it necessary to use an own…
Sara
  • 3,733
  • 6
  • 26
  • 30
3
votes
1 answer

Refresh managed session bean in JSF 2.0

After I commit some data into the database I want my session beans to automatically refresh themselves to reflect the recently committed data. How do I achieve this when using managed session beans in JSF 2.0? Currently I have to restart the web…
D. Bermudez
  • 217
  • 2
  • 9
  • 20
3
votes
1 answer

How to get all instances of a particular cdi session scoped bean

I have a @SessionScoped cdi bean which is used to track user session information in my web application. Is there any way to find all objects of this bean from another @ApplicationScoped bean?
yayayokoho3
  • 1,209
  • 2
  • 16
  • 40
3
votes
1 answer

Session Bean for Entity Classes error message: "EJB Remote Interface depends on JPA Entity classes ..."

I have created a new EnterpriseApplication (EA) in NetBeans 7.1. Added some JPA entities in the EJBModule. Now I want to add some Remote SessionBeans in the EnterpriseApplication. Then right clicked on the EJBModule, selected Session Bean for…
JustTrying
  • 121
  • 1
  • 2
  • 11
3
votes
1 answer

Spring 3 MVC: Expose session scoped bean in MVC Controller method arguments

I want to pass a session-scoped domain bean around my controllers for consistency and simplicity - but this doesn't seem possible OOTB. Hope someone can advise. Question: Can a session-scoped bean be exposed as a MVC Controller argument There…
Alex
  • 670
  • 11
  • 21
2
votes
1 answer

Where I can't create timer of EJB3 Timer Service?

In EJB3 Timer Service, I can create the timer with the timerService.createTimer(...)function, but the question is where I can use it? As I know, I can't do it in Session Bean's lifecycle function, like @PostConstruct function. I also read it can't…
cn1h
  • 1,188
  • 4
  • 16
  • 24
2
votes
1 answer

can i have more than one end point in my wsdl?

HI, I have a webservice which is developed using ejb stateless sessionbeans - and it serves more than 10 clients , now we are planning to change the endpoint url to some other ... and for sometime i would like to keep the old and new both endpoints…
user770085
  • 21
  • 3
2
votes
1 answer

Set / Get JSessionID - Proxy blocks set-cookies attribute

I got a problem using the Angular-Proxy to get/set the JSessionID for a @SessionBean. (What is usually handled by the Browser?) I´m trying to send the Request from localhost:4200 to localhost:8080. To overcome the CORS-Problem, I use a Proxy…
Elias S
  • 118
  • 10
2
votes
1 answer

Storing EJB 3 Session Bean references into Map

Currently I am using EJB3.0 session beans in my application. Normally i lookup the bean using jndi name and call the concerned method. But recently what I was suggested to store these references in a Map rather than looking up again and again. …
SacJn
  • 777
  • 1
  • 6
  • 16
1
2 3 4 5 6 7