A session bean encapsulates business logic that can be invoked programmatically by a client over local, remote, or web service client views. More specifically, a stateless session bean does not maintain a conversational state with the client, so it is mostly used as a service(e.g. rest api, persistence-retrieval) and does specific job without the need of keeping a state.
Questions tagged [stateless-session-bean]
188 questions
1
vote
1 answer
How can i get entity object with contion JPA
I have 2 Objects Site and Page.
A Site have many Pages.
I get pages with fetch Lazy type.
With a particular reason i want to get pages of a site where the date of pages > val.
@Entity
@Table(name = "site")
Public class Site {
String…

N.Khalifa
- 35
- 6
1
vote
0 answers
Why is my Stateless Session Bean not sending message in a transaction when the Connection, Session and MessageProducer is manually cached?
I'm working with a JMS broker that where it is slow/expensive to create MessageProducers.
Therefore, I've decided to cache the MessageProducer in a stateless Session Bean.
This works perfectly fine for non-transactional cases, but I'm having trouble…

russell
- 111
- 1
- 7
1
vote
3 answers
JSF + Stateless EJB performance
I have a JSF 2.0 application running on GlassFish v3. It has EJBs that serve database data via JPA for the main applications sessions. Even on non-IDE app-server, the EJB calls are very slow. Between some pages, the user has to wait over 10 seconds…

Daniel Szalay
- 4,041
- 12
- 57
- 103
1
vote
1 answer
No EJB found with interface of type 'javax.sql.DataSource' in wildfly-9.0.2.Final
Enviornment - Application Server-Wildfly-9.0.2, EJB 3.0
In stateless session bean, Jdbc connection has been created but the deployment of jar has been failed with following error and same jar was deployed successfully in JBOSS 5.x.
10:56:08,693…

Kamal Vijay
- 47
- 1
- 13
1
vote
2 answers
EJB3 + JSF2; Stateless like a Stateful
I've a stateless session bean in an ejb container. If I invoke it from a jsf2 form it works fine, but if I recall the form again it shows me the same data I've inserted before. It happens even if I close and reopen the browser. I must wait several…

Alf
- 2,291
- 1
- 28
- 34
1
vote
0 answers
Ejb3 -Accessing Local Enterprise Beans Using the No-Interface View
I'm trying to learn EJB3,
I created an EJB project with just a bean class:
package com;
import javax.ejb.Local;
import javax.ejb.Stateless;
@Stateless
@LocalBean
public class MyBean {
public MyBean() {
// TODO Auto-generated constructor…

Alex2330
- 347
- 1
- 7
- 21
1
vote
1 answer
Transaction between two session beans in ejb3
I have three tables server_detail, server_group, server_group_mappping and the entity classes as below. (have not given the full code details)
@Entity
@Table(name = "server_detail")
public class ServerBean implements Serializable {
private static…

Bhimaraju Pukkalla
- 21
- 6
1
vote
1 answer
JNDI binding EJB3 issues
I am stuck on a JNDI binding process on EJB3 and here is the source code which I am terribly stuck at.
/*
* Create session bean.
*/
public static AG20BWOPortal getSessionBean() throws NamingException, RemoteException,…

Farath Shba
- 31
- 4
1
vote
1 answer
Safe to store reference to Entity Bean after session ends?
This is a pretty newbie question- please know I'm aware of that.
I have a stateless session bean that needs to load up some data once and cache it locally in a static variable for use by all instances of that bean. The data can be accessed through…

jph
- 2,181
- 3
- 30
- 55
1
vote
3 answers
Error checking in business methods a.k.a doing defensive programming
I am starting to add tests to a large java code base. I often see the following in the session beans I am testing:
public OrderDTO getOrderDTO(Long id) {
Order o = (Order)entityManager.find(Order.class, id);
OrderDTO dto = new…

user1329339
- 1,295
- 1
- 11
- 26
1
vote
1 answer
How can I define the min and max number stateless bean instances
I'm using ejb3.1 and I would like to define the minimum and maximum number of instances of a stateless session bean. How can I do this?
Thanks.

Manuel Franqueira
- 326
- 1
- 4
- 13
1
vote
1 answer
Hibernate: Illegal proxy association on 2 sessions
I'm currently working on a job that do automates a subscription process from an input file.
So I have a class:
@Startup
@Singleton
public class ImportSubscriptionsJob implements Job {
//calls ImportSubscriptionsJobBean
}
The Singleton class…

czetsuya
- 4,773
- 13
- 53
- 99
1
vote
1 answer
Null Pointer exception when entity object is getting Persisted
I am trying to store an entity object to the db. But my problem is when entity object is getting persisted, it throws a null pointer exception.
Below is my entity class
@Entity
@Table(name = "BOOK")
@XmlRootElement
@NamedQueries({
…

Troller
- 1,108
- 8
- 29
- 47
1
vote
1 answer
EJB Transaction roll back in container managed transactions
I am reading this blog about transaction handling in container managed transactions.
The author clearly demarcates the difference between EJB transaction and database transaction.
A database transaction is just one of the EJB transactions.
Consider…

brain storm
- 30,124
- 69
- 225
- 393
1
vote
1 answer
relationship between CDI , Stateful session bean, stateless session bean ,pojo and different scopes
Im learning j2ee , pardon me if questions appear very basic.
In httpsession session ID is stored in client side and the data associated with it is stored in server side.
When stateful session bean interacts with web client a browser makes an initial…

s4194313
- 39
- 6