Implementing ADF Desktop Integration with EJB Datacontrol
By Juan Camilo Ruiz on Jul 15, 2010
When working with ADF you can select different technologies to implement the business logic of your application like ADF Business Components, EJBs, Web services, etc. In this entry I’m going to show you how to create a ADF desktop integration interface using the EJB/POJO data control.
Let’s start with an application that contains an Entity bean for the departments table, we create the corresponding session facade and then, its data control to expose the business services to the UI.
We create a page definition that will be used by the desktop integration spreadsheet. In the page definition we create bindings for all the elements such as table components, attributes, operations and methods that will be added in excel.
After setting up the Excel workbook, lets create a table that allow us to create, update and delete records from the departments table. For more information on how to set up your application and workbook go here.
Once you inserted the table component in the worksheet, edit the table properties, and enable the table actions. Notice that here there are some differences if we would had used Business Components.
Main things to point out:
- There is no commit activity when using EJBs
- The persist method gets called after each insert
- The merge method is the one used for updating rows
Once we set the operations respectively we can test and validate that our spreadsheet works in the same way than a table based on BCs. This shows you the advantages of using the ADF model to expose your business services for all multi channel user interfaces.