From the course: Java EE 7: Enterprise JavaBeans (EJB)
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Stateless session bean
From the course: Java EE 7: Enterprise JavaBeans (EJB)
Stateless session bean
- [Instructor] Now let's go ahead and create a stateless bean. As explained previously, a stateless session bean allows you to create business logic that is available across all clients and doesn't maintain a state. In this case, we'll create a facade. If you're not familiar with the facade pattern, in this case will allow us to create a view without an interface, which simplifies the code for our application. So what you need to do is again select the VinylApp dash EJB and right click, New, Other, and then we're going to select Persistence and then Session Beans for Entity Classes. Click Next. And you want to add the ejb RecordsEntity like so. Click Next. And that's all you have to do. So it's going to create the facade for you. So if we click on Finish, we have our facade completely created for us. So we have the Create, Edit, Remove, all that jazz. So basically that allow us very quickly to add some code to actually interact with our elements without creating the interface. And…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.