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
0
votes
0 answers

EJB with @TransactionManagement(javax.ejb.TransactionManagementType.BEAN) : Only session and message-driven beans allowed to access UserTransaction

Getting exception when i have already supplied: @TransactionManagement(javax.ejb.TransactionManagementType.BEAN) Kindly help in fixing error insertNewRecord:java.lang.IllegalStateException: WFLYEJB0137: Only session and message-driven beans with…
fatherazrael
  • 5,511
  • 16
  • 71
  • 155
0
votes
1 answer

Cannot creating Session Beans in Netbeans 11.1

My goal is to work with (stateless) session beans in NetBeans 11.1. I'm working on the OS Ubuntu-Mate 18 and I'm using the GlassFish 5.1.0 server. I tried to implement a session bean like in the tutorials…
Ramón Wilhelm
  • 967
  • 2
  • 18
  • 39
0
votes
1 answer

JMS messages sent from JavaEE with container managed transactions not sent until container commits the transaction

I have a JavaEE application that initiates long running transactions using a REST API (the requests return 202 Accepted). I am using JMS to send progress messages to clients that have initiated these processes. However, no messages are sent until…
mikee
  • 335
  • 3
  • 11
0
votes
1 answer

what happens when pool of stateless beans runs out

we know that the stateless sessions beans (JEE5 context) can be pooled. I was wondering what happens when the Server's pool of stateless session beans has no more instances left and another client request comes in... a) Is the client request put…
Robin Bajaj
  • 2,002
  • 4
  • 29
  • 47
0
votes
1 answer

Session info across EJB (Stateful Session Beans ) vs HTTP Session vs modern frameworks

Earlier days when I used to do coding, I used mostly Stateless Session Beans and all the info needed to traverse across pages was put in HTTP Session object. Back then(and even now) I never understood the "USP" of EJB being "transparent" and "safe"…
0
votes
1 answer

Injecting a Kotlin EJB into a Java POJO

Just started experimenting with Kotlin (1.2.60) & Java (EE8). All is deployed successfully in an EAR file onto JBoss WildFly 13.0.0.Final using Java EE 8, EJB 3.2. No exceptions are shown in the log. I've created a Kotlin…
NOTiFY
  • 1,255
  • 1
  • 20
  • 36
0
votes
2 answers

How to invoke a method in a session bean from an Android client?

I want to know whether it is possible to create an Android application to communicate with a session bean and invoke a method. if so can anybody explain how? or else can i invoke that method in the EJB with a JSP/servelet and call the JSP/Servelet…
Keshan
  • 14,251
  • 10
  • 48
  • 72
0
votes
0 answers

Java Servlet Showing Blank Page

I have created a simple EJB Application to demonstrate Session Bean by making a simple calculator on a JSP Page. For Stateless SessionBean. index.jsp <%@page contentType="text/html" pageEncoding="UTF-8"%> …
0
votes
1 answer

Java EE Transactional Type across various types of Beans

Consider the following scenario : Stateless Annotated Class ClassOne @Stateless public class ClassOne { // some injected fields // .... @Inject private ClassTwo classTwo; // .... public void methodInClassOne() { try…
0
votes
1 answer

Lookup using @EJB fails

I'm trying to look up my stateless bean using the annotation class @EJB, but fails. I'm using WildFly 10 as EE container. The stateless bean interface looks as follows: @Local public interface T1Service { String sayHi(); } The implementation…
Paul
  • 163
  • 1
  • 11
0
votes
0 answers

ejb3 : JBAS014590: Unexpected Error

trying to inject one stateless ejb bean into another stateless ejb bean. all stateless beans can inject successfully in flow. but for only one stateless ejb getting below error while loading. JBAS014590: Unexpected Error
Nagaraju
  • 83
  • 8
0
votes
1 answer

javax.ejb.EJBException: java.rmi.MarshalException

My question is with regards to error messages when i try to create or even view the credit package. This is the error message that i encountered in glassfish. Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services -…
user8779054
0
votes
1 answer

CDI Inject in Stateless Session Beans requests

Currently we have an elaborate POJO object structure for handling a webservice request, called a 'processor'. Remote and Local EJB's and PersistenceContext called during serving this request are initialized in the statless bean and handed to this…
Sjaak
  • 3,602
  • 17
  • 29
0
votes
0 answers

Session bean creation error on IntelliJ IDEA

I'm using IntelliJ IDEA, I tried to create a stateless session bean but I'm getting an error that says it cannot resolve @Stateless. Where I'm I going something wrong?
eldix_
  • 127
  • 4
  • 20
0
votes
1 answer

Stateless Session Bean with Local / Remote Interface

I am trying to understand the implementation difference between creating a local or remote interface for my stateless session bean however I see various solutions and am wondering if there is a certain "standard" or general "preference". For local…
jasmine
  • 361
  • 1
  • 3
  • 11