Today Oracle released JDeveloper 11gR2 and it's time to do a testdrive on the new EJB, JPA and ADF JAVA or EJB Datacontol R2 features. Last Open World I had a great meeting about these features with Frank Nimphius and one of the developer who made this happen. So I am very curious about this new release.
We start with the Model project and do Create Entities from Tables to add some entities to the model project.
In the wizard you can disable the discovering of Foreign Keys and generate a toString method on the entity
The generation of a SDO Service Interface on the Bean used to go very wrong ( start it by generating service interface on the session bean). Now I only have to fix the response elements of the SessionBean XSD with the right types ( but this is so easy because the property editor of jdeveloper can see the imported types).
Next step is to add an EJB Session Bean and generate an ADF DataControl on the remote interface.
Here you can see that there are no ADF xml Entity files.
And the last feature for now, is the JNDI url for the remote EJB in the web.xml of your Web application. before 11gR2 you should use a foreign JNDI provider or change with ANT the provider-url in the ejb-definition. Now when you drag the EJB DataControl into your web application then JDeveloper adds a ejb-ref entry to the web.xml but also add a new env-entry with the EJB DataControl name so you can provide the t3 url in the web.xml. The web.xml can be changed in a weblogic deployment plan.
That's all for Part 1, next time we can gonna use the ADF EJB DataControl in a JSF Page.