Questions tagged [stateless-session-bean]

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.

188 questions
1
vote
2 answers

Do you really need stateless session beans in this case?

We have a project with a pretty considerable number of EJB 2 stateless session beans which were created quite a long time ago. These are not the first-line beans which are accessed from our client via RMI, rather they are used by that code to…
John Munsch
  • 19,530
  • 8
  • 42
  • 72
1
vote
4 answers

How GlassFish maps client requests to sessions

With EJB (3.x) you have a choice of Session Beans: @Stateful and @Stateless. If I understand the basics behind these two options: @Stateful - Each user/client gets their own and is thus typically not pooled; maintains state across multiple…
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
0
votes
1 answer

Accessing EJB methods from an Action Class defined in struts

I have two projects defined in Eclipse. One of them is an EJB(3.0) project and the other is a dynamic web project. I have defined a stateless session bean named LoginAuthenticator and created two interfaces local and remote for it. In my EJB project…
sragvuw
  • 33
  • 5
0
votes
1 answer

inject stateless bean into a singleton bean

I have this requirement: I have a singleton bean and I have a method annotated with @PostConstruct where I perform some initialization. One of the initialization is to read some values from a DB, so I want to inject in this method a Stateless bean…
Elvis
  • 817
  • 1
  • 7
  • 19
0
votes
1 answer

EJB3. How JNDI lookup works

I'm building little framework for data processing with EJB 3. I have Entity Access Object tier which abstracts from data source. Now I need some kind of factory which will give me right bean to query entities. Is it safe to pass looked up through…
Alex Povar
  • 4,890
  • 3
  • 29
  • 44
0
votes
1 answer

How does a web server/container treat a POJO in respect to other classes like EJB's and Entities?

I'm trying to use plain old java objects(POJO)'s and regular class files where needed and only use EJBs when I need the functionality that they add such as asynchronous calls, pooling, etc. I'm wondering how the server treats this behavior once the…
Randnum
  • 1,360
  • 4
  • 32
  • 48
0
votes
2 answers

Why we get java.lang.ClassCastException: $Proxy, in jndi lookup of a Stateless Session Bean in Glassfish 3.1.1

We are having problems looking up a Local Stateles session Bean instance in a utility class. We always get a ClassCastException: $ProxyXYZ (XYZ is any number) We are using Glassfish 3.1.1, JPA 2, EJB 3, JSF2 Everything is packaged in a ear…
jvacaq
  • 1,429
  • 2
  • 12
  • 19
0
votes
0 answers

Why Stateful bean is showing the opposite behavior

I am getting different instances (on clicking Test then going back and repeating) of the Demo. I was expecting the same instance. Can someone explain what I am missing here? Bean @Stateful @LocalBean public class Demo { public Demo() { …
0
votes
2 answers

Stateless Bean is null

It was working earlier when I was jersey 1.1. But now it says this.userBean is null. Apart from that there is one warning in the log related com.sun.faces.flow.FlowDiscoveryCDIHelper is deprecated from CDI 1.1! logs: 08:30:45,161 INFO …
0
votes
1 answer

Usage of @Stateless and @Transactional on a POJO class - when and why?

I have a developer in my team who uses both of the annotations @Stateless and @Transactional on POJO classes that do not need any of these to work correctly. Example: @Stateless @Transactional(Transactional.TxType.REQUIRED) public class…
0
votes
0 answers

@TransactionAttribute( TransactionAttributeType.NEVER ) on SSB seem to change timeout. On JBOSS EAP 7 (and Wildfly?)

In our solution there are a number of stateless session beans that implement CXF SOAP services or RESTEasy endpoints. Like this: @Path( "/" ) @Stateless @TransactionAttribute( TransactionAttributeType.NEVER ) public class ValidationBean { //…
Sjaak
  • 3,602
  • 17
  • 29
0
votes
1 answer

How to implement an interceptor in a timer in jakarta EE9

I want to have a Stateless session bean in JAKARTA EE9 where I print "hello" on the console every 10 seconds. This is achieved by the following code. @jakarta.ejb.Stateless(name = "MyTimerEJB") public class MyTimerBean { @Schedule(hour ="*",…
0
votes
1 answer

Error In JPQL Data inside a stateless bean

I have a JSF / JPA / MySQL / EclipseLink GlassFish or Payara application. A schedule is running inside a stateless EJB. The data is extracted through JPQL using EJBs inside the stateless bean. When the database queries a small amount of data, the…
0
votes
1 answer

How Do I Correctly Deploy A Bean - JNDI, Weblogic 12C

I am trying to create a bean for a weblogic 12C server. The bean is just going to hold a couple values that at least one (possibly more) application(s) can reference (specifically - a bearer token, the duration of the token, and when it was…
Keith Fosberg
  • 89
  • 2
  • 9
0
votes
1 answer

JSF converter fails to intialize

I have a facelet page in which i have a primefaces selectCheckboxMenu where a user can select one or more conferences. Primefaces 8.0, 5.194 #badassfish (build 327)|#] org.glassfish
Kim Gabrielsen
  • 435
  • 2
  • 6
  • 21