From the course: Java EE: Concurrency and Multithreading

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Define the session bean class for database operations

Define the session bean class for database operations

From the course: Java EE: Concurrency and Multithreading

Start my 1-month free trial

Define the session bean class for database operations

- [Instructor] Now let's do the next step. We have to create a TransactionBean which is going to do those DB operations against the respective tables. The bank account transaction and the bank account transaction log, right? So let's go back to the IDE and under the source packages, I'll add a package and say com.app.ejbBeans. So I'm going to create a stateless session Bean. If you remember in our earlier videos we talked about this concept. It is basically a kind of enterprise Java Bean which allows you to do independent operations based on your request processing needs. So I'm just going to say finish. And here I'll create a session Bean. Let's name it TransactionBean. Okay, and you do see it is already annotated with the stateless annotation. Let's also give this Bean a name. So I'm going to say, bx Bean. Now here, we have to define a couple of methods. One, to save the bank account transaction information, And the other, to save the bank account transaction log information. So…

Contents