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
1
vote
1 answer

Spring session bean initialization on event

In my project i need SessionBean to store objects associated with current session. On Session is created and user is authenticated i want to set objects to my bean. Bean definition:
kris14an
  • 741
  • 7
  • 24
1
vote
1 answer

Singleton session bean

Singleton session bean has been introduced to address what problems ?? is it only for sharing the data that is common for all the beans ?? How is that problem managed in EJB 3.0 and versions before that ? If it retains the client specific…
Ragul
  • 335
  • 1
  • 3
  • 12
1
vote
1 answer

intellij: wizard to create facades for my entities

Right now I'm doing a tutorial in Java EE. Problem is: The tutorial says that I have to create facades of my entities from my database. The tutorial is designed for the NetBeans IDE, but at work i must use IntelliJ. I'm not a big fan of IntelliJ at…
bonbon
  • 243
  • 4
  • 11
1
vote
2 answers

start transaction AFTER not BEFORE start of synchronized method in singleton bean

I have a war file deployed in glassfish. We have a Singleton bean and we have 1 synchronized method in it. @TransactionAttribute (TransactionAttributeType.REQUIRED) public synchronized void do() { ... } However, I am noticing that transaction…
user674669
  • 10,681
  • 15
  • 72
  • 105
1
vote
1 answer

When to use Session Bean

Good day fellas, I'm a confused about which session bean am to use for my application. I'm trying to build a mobile web app like Facebook which can allow multiple users at the same time. I surf the internet to get more information. From the info I…
user3655892
  • 13
  • 1
  • 6
1
vote
2 answers

Spring session bean shared between HttpSession-s

I'm trying to undestand session beans in Spring. The book I'm reading says, about them, that: the bean is created when needed and stored in the javax.servlet.http.HttpSession. When the session is destoyed so is the bean instance. I tried with the…
Antonio
  • 1,065
  • 3
  • 14
  • 27
1
vote
1 answer

Spring. Access session Bean in my CustomDataSource getConnection method

Does anybody know how to access a session scoped bean in a DataSource getConnection? I decided to implement a separate database schema for each client (Multi-tenancy) and I found this very promising article: Multitenancy using Spring and…
elysch
  • 1,846
  • 4
  • 25
  • 43
1
vote
1 answer

Session scoped bean not stored in user session

I tried to develop a simple authentification application based on BaluC's answer in JSF HTTP Session Login, but the problem is that my session scoped bean UserManager is not stored in the user session, so when the LoginFilter checks if the user is…
ThunderPhoenix
  • 1,649
  • 4
  • 20
  • 47
1
vote
0 answers

Session scoped bean multiple constructor calls

I have a session scoped bean (I have checked the imports and they are correct for ManagedBean). There is a main page which checks if the user has been authenticated by calling one of the get methods of the session bean. Upon first view I see that…
avrono
  • 11
  • 1
  • 3
1
vote
1 answer

Lookup failed error while trying to lookup a local EJB Session from a standalone POJO class inside a servlet

In a Java EE application I have coded a layout manager class. From this class, sometimes i need to access EJB Session from the EJB module. Here is the code and this is generated code: private MessagesFacadeLocal lookupMessagesFacadeLocal() { try…
mrN
  • 3,734
  • 15
  • 58
  • 82
1
vote
1 answer

IllegalStateException when trying to .getSessionMap() from a Session Scoped Bean

I'm new to Java and JSF. I need help with an IllegalStateException. Here's the scenario: In my current project i have this Session Scoped bean for the application menu: public final class MenuBean implements Serializable{ private MenuModel…
Pedro Peixoto
  • 219
  • 2
  • 6
  • 16
1
vote
1 answer

Create a stateful session bean from a stateless bean

The context is the following : An client application uses a stateless session bean in order to login on an EJB server application. If the login is successful, the client should get a stateful session bean in order to perform some transactions on his…
Emanuel
  • 155
  • 2
  • 11
0
votes
1 answer

Runtime Exception while creating EJB Object

I have developed an application with Java 1.6, EJB-2.1. The application is deployed on JBossAS-5.1.0. The application has been running very smooth for long a time. But for last two days, I found following sort of Runtime Exception while creating EJB…
Hushen Savani
  • 346
  • 6
  • 18
0
votes
1 answer

Inter glassfish Session Bean sharing

I'm trying to find a way to do that, but I could not find the riiiiight answer googling it. I think I'm close to it but I fell like something is still missing, or I just need some external opinion that this is the best way. I'd like to access a…
marcelocbf
  • 117
  • 2
  • 11
0
votes
0 answers

Stripe WebHook Within Java Servlet

I'm trying to catch WebHooks triggers from Stripe Platform within an HttpServlet . Here's the code : @WebServlet("/StripeWebhook") public class StripeWebhook extends HttpServlet { private static final long serialVersionUID = 1L; //…
MADARASSOU David
  • 149
  • 1
  • 1
  • 5