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

EJB - System out printl - how to make it work

In university i'm doing EJB project on Java. I have some Beans (Remote interface and it implementation, which do the main business logic). And i want to print some debugging text\information. For example: @Stateless(mappedName =…
alena_fox_spb
  • 697
  • 1
  • 8
  • 24
0
votes
1 answer

EJB 3.1 Singleton Session Bean @PreDestroy method not called

I have a Singleton Session Bean executing background tasks: @Singleton @ConcurrencyManagement(ConcurrencyManagementType.BEAN) @TransactionManagement(TransactionManagementType.BEAN) @Startup public class TaskQueue { private static final Logger…
yuan ws
  • 3
  • 1
  • 2
0
votes
1 answer

Java EE Application to display current server time in seconds

Here's the SCCE I've written. I'm completely new to java web application programming which means it's completely possible that I'm missing something. So any advice for a newbie moving forward is really appreciated. I've tried referencing the package…
Richard Barker
  • 1,161
  • 2
  • 12
  • 30
0
votes
1 answer

Runnig tests that use EJB in Netbeans

I'm developing a client-server application using EJB and Glassfish in NetBeans. I've implemented a method on the client that uses a Session Bean. I've tried the method calling the method from the main and it works. Now I was trying to test the…
fnlls10
  • 78
  • 1
  • 7
0
votes
0 answers

JSF and EJB integration

I am trying to create a login page for my application but i am stuck on the very first step. My form is working fine before using session facade in my bean, after adding session facade i got property not found exception: My page is:
0
votes
1 answer

Calling session bean from servlet vs jsp->servlet grants different result

I'm having a problem trying to call a method of session bean, when calling firstly the servlet from a JSP, then the servlet calling the method of session bean to obtain some data it seems to get a NullPointerException. On the other hand if I just…
Adrian
  • 215
  • 1
  • 6
  • 14
0
votes
1 answer

EJB Local includes Remote

Let's assume we are using EJB3 and our session bean uses/implements Local Interface L and Remote Interface R. @Local public interface L { abstract void localMethod(); } @Remote public interface R { abstract void remoteMethod(); } My Question…
mateuszk87
  • 143
  • 11
0
votes
1 answer

ejb interceptor for a stateless session bean,how can i invoke a stateful session bean

A class is a stateful session bean with a loginUser property. B class is a stateless session bean with a method addAUser. how does the interceptor check wether A.loginUser is null when B.addUser method be used. thank u .
0
votes
2 answers

Fill a session bean with data before other methods execute in Controller

I'm creating a Spring application and in it I have a side bar which can be use to access modules of the application. The side bar remains visible through out all views of the application. I create the view using Apache Tiles. Since I don't want to…
0
votes
1 answer

how can I divide an EJB 2 session bean

I have some session beans that are becomming quite complex so I want to find a way to divide them, but I still need to treat the divided parts as session beans.
clauss
  • 3
  • 3
0
votes
1 answer

lookup EJB in member instantiate

i have an issue of saving a reference to an EJB as a member from a non EJB class (which is used as static member in an EJB) say i have @EJB(...) @Stateless public Class SessionBean implements MySession{ protected static MyHelper helper = new…
Yoni
  • 375
  • 3
  • 19
0
votes
1 answer

Same SessionBeans with different states

I have an issue that makes me think that i'm doing something in the wrong way. I have a sessionBean with an entity called CashRegister that holds the cash register. When this property is null, then it means that no cash register has been created. I…
oriuken
  • 653
  • 3
  • 7
  • 19
0
votes
1 answer

Alternative for session bean

I have web application based on jsp and spring mvc where i need resolve this task : The user must be able to add new instances of the main entity using wizard dialog. The wizard consists of 3 steps: On the first step there must be a form which…
Valerii Rusakov
  • 1,091
  • 2
  • 11
  • 22
0
votes
1 answer

the method doesn't add daa in the database

i'm working on an ejb 3.0 tutorial and i want to add data to the database when i set run it doesn't indicate any error and it doesn't add the following data in the db either : this is the session bean code : public String creerCompte(CompteBancaire…
marcAntoine
  • 668
  • 5
  • 19
  • 35
0
votes
1 answer

How to get JSF to auto-instantiate a session bean

This was asked in a previous question (http://stackoverflow.com/questions/6043259/auto-instantiate-a-session-bean). I implemented the solution offered by BalusC but it isn't working. This is my code: @ManagedBean @SessionScoped public class…
Matthew Oakley
  • 507
  • 1
  • 6
  • 15