In the current version of ADF Mobile the ADF DataControls ( URL and WS ) only supports SOAP and JSON-XML. But this does not mean we cannot use JSON. To handle JSON we can use the RestServiceAdapter and JSONBeanSerializationHelper classes. The RestServiceAdapter will handle the Rest Service and JSONBeanSerializationHelper helps us converting JSON to Java.
I made a little ADF Mobile demo based on the Google Maps Geocoder and use this url to test it
http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&sensor=true
with this as result
We start by creating an Url Connection with http://maps.googleapis.com/maps/api/geocode/json as value
Next is a new Class which can be used a managed bean or as a Java DataControl.
Here we do the following steps.
Create the RestServiceAdapter
RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();
restServiceAdapter.clearRequestProperties();
Use our Url Connection
restServiceAdapter.setConnectionName("GoogleGeocodeJSON");
HTTP Get operartion
restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);
Append the url with our search parameters
restServiceAdapter.setRequestURI("?address="+search+"&sensor=true");
Send and wait for the result.
response = restServiceAdapter.send("");
Next step is using the JSON deserialization, here we will use the JSONBeanSerializationHelper class.
ServiceResult responseObject = (ServiceResult)jsonHelper.fromJSON(ServiceResult.class, response);
ServiceResult class will be used as output, too bad I can't use generics or annotations to control the JSON deserialization. So I will use JSONArray in case of 1 or more results.
import oracle.adfmf.json.JSONArray;
public class ServiceResult {
private String status;
private JSONArray results;
JSONBeanSerializationHelper will look for attributes called .type and if that contains a class name then it will use that class for deserialization but I can't change the Google Maps service.
So I made my own Helper class which converts all JSONArray or JSONObject to the right class and attributes.
geoResult = GeocoderHelper.transformObject(responseObject).getResults();
Here is my the helper class
Now we are ready to use it in a managed bean or generate an ADF DataControl on it.
with this as result.
You can find my demo code on Github https://github.com/biemond/jdev11gR2_examples/tree/master/MapsMobileRest
Here the pictures of the application in the IPad emulator.
Showing posts with label jdeveloper 11gR2. Show all posts
Showing posts with label jdeveloper 11gR2. Show all posts
Sunday, October 28, 2012
Sunday, October 23, 2011
Using FMW IdentityStore for your User management
In Fusion Middleware you can use IdentityStore framework to do all your user, role and password management. This IDM and JPS frameworks will give you a lot options which you don't have with the standaard JAAS framework of WebLogic ( you need to create your authentication provider and add a private principal to the subject). IDM framework works really great with LDAP identity providers like the default WebLogic internal LDAP, OpenLDAP, Oracle Internet Directory ( OID ) or Microsoft Active Directory.
With this you don't need to make your own software to do some user management on a particular LDAP provider, IDM can do it for you and IDM will detect the right LDAP provider. So you just need to implement this and IDM will do all the work.
This is what you can do with IDM.
Before we begin, is good to know how the IdentityStore will work with LDAP providers. Default it only works with the internal WebLogic LDAP. If you also want to use AD or OID, then you need to add it to WebLogic authentication provider of the myrealm security realm ( no need to add it to the jps-config.xml located at domain/config/fmwconfig ,this is only necessary when you don't use WebLogic ).
The jps serviceInstance called idstore.ldap can detect all the LDAP providers which are configured in WebLogic.
But when you have more then one LDAP providers then you got two options.
Using LDAP attributes can be very handy for retrieving particular information which you can use in your application, like location information else you need to create a lot of roles to achieve the same. You can retrieve for example the location attribute and pass this value to the database ( Use it in Virtual Private Database VPD what Larry said it is a false cloud feature :-) ) or use it to disable some region screens.
Here I need to create JpsContext and lookup the IdentityStore. After that I can lookup the User with its UserProfile and retrieve the LDAP attributes by retrieving the PropertySet.
Important to know that these user operations will use the account defined in the authentication provider, there is no check if your normal user should be able to do so. So test this for a possible abuse.
These are the steps to create a new Role in your LDAP repository. Lookup the RoloManager and use the createRole method.
We can also create a user and assign a role to this new user. In this case also need to provide a AD property called samaccountname. After that I can retrieve the UserManager and use the createUser method. Lookup the role and assign to this user.
The last part is about how you can store your passwords in a safe way on the WebLogic Server. Every environment can have its own passwords and this can be managed by your Administrators.
To store a password in the credential store you can use the following wlst script.
start wlst.cmd from oracle_common\common\bin not from the the weblogic server home
connect('weblogic','weblogic1','t3://localhost:7101')
createCred(map="JPS",key="AD_ldap",user="CN=Administrator,CN=Users,DC=alfa,DC=local",password="Welcome02" ,desc="Windows LDAP user")
exit()
To allow FMW to retrieve this password I need to give the authenticated role some permissions on this map.
Open the jazn-data.xml of your FMW application, lookup the authenticated role and add the following entries
oracle.security.jps.service.credstore.CredentialAccessPermission with read permission for context=SYSTEM,mapName=JPS,keyName=AD_ldap.
Somehow I also need to do this for mapName=j2ee-app#V2.0. The WebLogic will provide some logging to say what you are missing.
And here the code to retrieve it.
You can download my sample application at github https://github.com/biemond/jdev11g_examples/tree/master/ADFSecurity
With this you don't need to make your own software to do some user management on a particular LDAP provider, IDM can do it for you and IDM will detect the right LDAP provider. So you just need to implement this and IDM will do all the work.
This is what you can do with IDM.
- Retrieving and changing LDAP attributes of a user.
- User management, search, create users in a particular LDAP provider.
- Role management, search, create etc.
- Retrieve a username and password from the credential store and use it in your own application.
Before we begin, is good to know how the IdentityStore will work with LDAP providers. Default it only works with the internal WebLogic LDAP. If you also want to use AD or OID, then you need to add it to WebLogic authentication provider of the myrealm security realm ( no need to add it to the jps-config.xml located at domain/config/fmwconfig ,this is only necessary when you don't use WebLogic ).
The jps serviceInstance called idstore.ldap can detect all the LDAP providers which are configured in WebLogic.
But when you have more then one LDAP providers then you got two options.
- Add the virtualize property with value true to the idstore.ldap serviceInstance ( in jps-config.xml located at domain/config/fmwconfig ) . This will switch IDM from WebLogic to Oracle Virtual Directory mode. This will make sure that FMW applications will see all the users and roles. When you use Webcenter or SOA Suite / BPM Human worklist application then you need to add this property when you have more then one LDAP provider. In this OVD mode you can't retrieve the LDAP attributes of a user, OVD did not implement this option.
- Re-order the LDAP authentication providers. The first authenticator provider will be used and the other will be ignored, ( WebLogic will still use all it's authenticators for JAAS but FMW will not ). That's why in some forums or blogposts talk about re-ordering of the authentications providers. In most cases is setting the virtualize a better approach.
Using LDAP attributes can be very handy for retrieving particular information which you can use in your application, like location information else you need to create a lot of roles to achieve the same. You can retrieve for example the location attribute and pass this value to the database ( Use it in Virtual Private Database VPD what Larry said it is a false cloud feature :-) ) or use it to disable some region screens.
Here I need to create JpsContext and lookup the IdentityStore. After that I can lookup the User with its UserProfile and retrieve the LDAP attributes by retrieving the PropertySet.
Important to know that these user operations will use the account defined in the authentication provider, there is no check if your normal user should be able to do so. So test this for a possible abuse.
These are the steps to create a new Role in your LDAP repository. Lookup the RoloManager and use the createRole method.
We can also create a user and assign a role to this new user. In this case also need to provide a AD property called samaccountname. After that I can retrieve the UserManager and use the createUser method. Lookup the role and assign to this user.
The last part is about how you can store your passwords in a safe way on the WebLogic Server. Every environment can have its own passwords and this can be managed by your Administrators.
To store a password in the credential store you can use the following wlst script.
start wlst.cmd from oracle_common\common\bin not from the the weblogic server home
connect('weblogic','weblogic1','t3://localhost:7101')
createCred(map="JPS",key="AD_ldap",user="CN=Administrator,CN=Users,DC=alfa,DC=local",password="Welcome02" ,desc="Windows LDAP user")
exit()
To allow FMW to retrieve this password I need to give the authenticated role some permissions on this map.
Open the jazn-data.xml of your FMW application, lookup the authenticated role and add the following entries
oracle.security.jps.service.credstore.CredentialAccessPermission with read permission for context=SYSTEM,mapName=JPS,keyName=AD_ldap.
Somehow I also need to do this for mapName=j2ee-app#V2.0. The WebLogic will provide some logging to say what you are missing.
And here the code to retrieve it.
You can download my sample application at github https://github.com/biemond/jdev11g_examples/tree/master/ADFSecurity
Monday, June 13, 2011
Building with Maven in JDeveloper 11gR2
With JDeveloper 11gR2 you can use Maven 2 as your build engine, before 11gR2 you could download a plugin which did not work great because all the required Oracle libraries which were not available in a public repository. So you had no choice to add them manually to a Maven Repository before you can use Maven. With 11gR2 Oracle fixed that by adding your projects libraries to the local Maven Repository when you add a Pom.xml to your projects.
Using Maven in JDeveloper is not that simple and I hope that this blogpost can help you to use maven as your buidtool.
First check if you have in your user profile a folder called .m2 . This folder must contain a settings.xml file ( you can copy it from jdeveloper\apache-maven-2.2.1\conf ) And also add a sub folder called repository.
Select for example your model project and add a Maven POM for Project to this project
You will get a POM overview which matches with your project.
This will add the libraries of the model project to your local Maven repository.
Now you can do the same for the ViewController project.
The only thing missing is the application workspace POM.xml which build all workspace projects. Add the Application POM to your workspace.
Don't enable Generate POM for Projects in this Application because we already did that.
This Application POM is located in the Application Resources window and only contains the Model and ViewController references,
In the project options or when you select the POM.xml you can change the Maven settings
Add some extra Maven goals to your project.
or add some extra Maven Repositories, like your company one.
Too bad indexing the Maven repositories ends in a error. Even when I use my own repository. You can ignore this error.
This is fixed in the 11gR2 patch and now it is working fine.
Now its time to build your project by running the Maven Package Goal.
The Model project was no problem.
The ViewControler project was different.
First I got a Apacle Trinidad error ( the ADF Faces Runtime needs a Trinidad pom )
Cannot find parent: org.apache.myfaces.trinidad:trinidad for project: null:trinidad-api:jar:null for project null:trinidad-api:jar:null
You can try to add and remove the right dependency ( oracle.jdeveloper.library:ADF-Faces-Runtime-11:pom:11.1.2.0.0 ), maybe this will fix it.
This is fixed in the 11gR2 patch and now it is working fine.
In the Maven setting you can Add or Remove the library dependency.
You will get a message that the local repository will be updated.
In case of the Apache Trinidad error. I need to update the trinidad pom in my local repository and remove the missing parent and move the groupId and version element,
This is fixed in the 11gR2 patch and now it is working fine.
<!--
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad</artifactId>
<version>2.0.0.1-SNAPSHOT</version>
</parent>
-->
<groupId>org.apache.myfaces.trinidad</groupId>
<version>2.0.0.1-SNAPSHOT</version>
<artifactId>trinidad-impl</artifactId>
<packaging>jar</packaging>
and so it goes on and on. Also need to do this for the 2 RichClient Faces POMs located in .m2\repository\oracle\adf\view\faces
Somehow the parent POM of the Oracle and Apache POMs are not added to the local repository.
And it would be great if Oracle made a option to force the synchronization of all the Jdeveloper libraries ( disc space is not a problem anymore and make it complete ) and even a option to export these POMs to your own Maven Repository.
The ViewController project has a dependecy with the model project so you need to make sure that the ViewController project can find the Model jar. To do so I will add my own Maven Repository to all the projects.
Change the Settings.xml of Apache Maven or of your local Maven repository and the add the username password which can upload the model artifact.
In the Model POM add a Distribution so Maven can upload the model artifact.
The ViewController can now find the Model dependency and you can create the WAR. This is a big one (130) because it adds all the reference jar to the web-inf/lib. You need to control this by deselecting the export option in the Maven project dependency.
To solve the Apache Trinidad dependency you need to add the Apache repository on the ViewController maven repositories. Add https://repository.apache.org/content/repositories/snapshots/ as url
Open the ADF-Faces-Runtime-11-11.1.2.0.0.pom located in .m2\repository\oracle\jdeveloper\library\ADF-Faces-Runtime-11\11.1.2.0.0\ and change the Trinidad dependency from 2.0.0.1-SNAPSHOT to 2.0.0.3-SNAPSHOT
The 2.0.0.1-SNAPSHOT does not exists in the Apache repository anymore.
This is fixed in the 11gR2 patch and now it is working fine.
Do the same for Trinidad-Runtime-11-11.1.2.0.0.pom located at .m2\repository\oracle\jdeveloper\library\Trinidad-Runtime-11\11.1.2.0.0
This is fixed in the 11gR2 patch and now it is working fine.
Also got a Maven Package Goal error when I run this Package Goal twice. It is solved when I do a clean first.
Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
class : org.apache.maven.plugin.war.util.WebappStructure
required-type : org.apache.maven.plugin.war.util.WebappStructure
path : /webapp-structure
line number : 1
Using Maven in JDeveloper is not that simple and I hope that this blogpost can help you to use maven as your buidtool.
First check if you have in your user profile a folder called .m2 . This folder must contain a settings.xml file ( you can copy it from jdeveloper\apache-maven-2.2.1\conf ) And also add a sub folder called repository.
Select for example your model project and add a Maven POM for Project to this project
You will get a POM overview which matches with your project.
This will add the libraries of the model project to your local Maven repository.
Now you can do the same for the ViewController project.
The only thing missing is the application workspace POM.xml which build all workspace projects. Add the Application POM to your workspace.
Don't enable Generate POM for Projects in this Application because we already did that.
This Application POM is located in the Application Resources window and only contains the Model and ViewController references,
In the project options or when you select the POM.xml you can change the Maven settings
Add some extra Maven goals to your project.
or add some extra Maven Repositories, like your company one.
Too bad indexing the Maven repositories ends in a error. Even when I use my own repository. You can ignore this error.
This is fixed in the 11gR2 patch and now it is working fine.
Now its time to build your project by running the Maven Package Goal.
The Model project was no problem.
First I got a Apacle Trinidad error ( the ADF Faces Runtime needs a Trinidad pom )
Cannot find parent: org.apache.myfaces.trinidad:trinidad for project: null:trinidad-api:jar:null for project null:trinidad-api:jar:null
This is fixed in the 11gR2 patch and now it is working fine.
In the Maven setting you can Add or Remove the library dependency.
You will get a message that the local repository will be updated.
In case of the Apache Trinidad error. I need to update the trinidad pom in my local repository and remove the missing parent and move the groupId and version element,
This is fixed in the 11gR2 patch and now it is working fine.
<!--
<parent>
<groupId>org.apache.myfaces.trinidad</groupId>
<artifactId>trinidad</artifactId>
<version>2.0.0.1-SNAPSHOT</version>
</parent>
-->
<groupId>org.apache.myfaces.trinidad</groupId>
<version>2.0.0.1-SNAPSHOT</version>
<artifactId>trinidad-impl</artifactId>
<packaging>jar</packaging>
and so it goes on and on. Also need to do this for the 2 RichClient Faces POMs located in .m2\repository\oracle\adf\view\faces
Somehow the parent POM of the Oracle and Apache POMs are not added to the local repository.
And it would be great if Oracle made a option to force the synchronization of all the Jdeveloper libraries ( disc space is not a problem anymore and make it complete ) and even a option to export these POMs to your own Maven Repository.
The ViewController project has a dependecy with the model project so you need to make sure that the ViewController project can find the Model jar. To do so I will add my own Maven Repository to all the projects.
Change the Settings.xml of Apache Maven or of your local Maven repository and the add the username password which can upload the model artifact.
In the Model POM add a Distribution so Maven can upload the model artifact.
The ViewController can now find the Model dependency and you can create the WAR. This is a big one (130) because it adds all the reference jar to the web-inf/lib. You need to control this by deselecting the export option in the Maven project dependency.
To solve the Apache Trinidad dependency you need to add the Apache repository on the ViewController maven repositories. Add https://repository.apache.org/content/repositories/snapshots/ as url
Open the ADF-Faces-Runtime-11-11.1.2.0.0.pom located in .m2\repository\oracle\jdeveloper\library\ADF-Faces-Runtime-11\11.1.2.0.0\ and change the Trinidad dependency from 2.0.0.1-SNAPSHOT to 2.0.0.3-SNAPSHOT
The 2.0.0.1-SNAPSHOT does not exists in the Apache repository anymore.
This is fixed in the 11gR2 patch and now it is working fine.
Do the same for Trinidad-Runtime-11-11.1.2.0.0.pom located at .m2\repository\oracle\jdeveloper\library\Trinidad-Runtime-11\11.1.2.0.0
This is fixed in the 11gR2 patch and now it is working fine.
Also got a Maven Package Goal error when I run this Package Goal twice. It is solved when I do a clean first.
Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
cause-exception : com.thoughtworks.xstream.converters.reflection.ObjectAccessException
cause-message : Cannot construct org.apache.maven.plugin.war.util.WebappStructure as it does not have a no-args constructor
class : org.apache.maven.plugin.war.util.WebappStructure
required-type : org.apache.maven.plugin.war.util.WebappStructure
path : /webapp-structure
line number : 1
Wednesday, June 8, 2011
Using the EJB or Java Datacontrol in ADF Rich Faces
In my previous blogspot I showed you the new JDeveloper 11gR2 EJB and ADF DataControl features and in this blogpost I will use this EJB or Java DataControl in a JSF page.
I made a simple EJB model project which uses the dept and emp tables of the Scott schema. This project also contains with a Session Bean on which I generated an ADF DataControl.
When you open the DataControls.dcx in your model project and select one of your DataControl entries you can click on the edit button. This will open and generate an ADF entity xml in which you can change some properties.
We will add a new Named Criteria in which you can search on a particular location of the department. This criteria can be used in a Query Panel.
The criteria dialog, where I add the location attribute of the dept entity and compare it with a bind variable.
When we switch to the ViewController project, you will see this criteria in the DataControl Window.
Drag All Queriable Attributes on the JSF Page and choose for ADF Query Panel with Table.
You can run this page and in the top right Combobox you can select your criteria, next the bind variable will be shown on the query panel.
The saving of your own custom queries in the MDS store is not working (yet) with this DataControl. You will get a viewobject error. And I can't define a list of values on an attribute, so no nice combobox in the query panel.
The second part of this blogpost will show you, how you can change a department of a employee. Here you can see that the employee entity has the department entity as attribute( no dept_id attribute).
Drag the empFindAll operation on the page and choose for ADF Form
You can see that there is no combobox option for the department entity but you can include its attributes.
On runtime it will look like this.
I removed the entity attributes of Dept and drag the dept attribute from the DataControl on the Form and choose for ADF Select One Choice.
The Base Data Source is the dept entity inside the Employee entity and add a new other department operation as List Data Source
Add the data mapping and display some department attributes.
This time a combobox is displayed and you can change the department on the employee
That's all for now.
I made a simple EJB model project which uses the dept and emp tables of the Scott schema. This project also contains with a Session Bean on which I generated an ADF DataControl.
When you open the DataControls.dcx in your model project and select one of your DataControl entries you can click on the edit button. This will open and generate an ADF entity xml in which you can change some properties.
We will add a new Named Criteria in which you can search on a particular location of the department. This criteria can be used in a Query Panel.
The criteria dialog, where I add the location attribute of the dept entity and compare it with a bind variable.
When we switch to the ViewController project, you will see this criteria in the DataControl Window.
Drag All Queriable Attributes on the JSF Page and choose for ADF Query Panel with Table.
You can run this page and in the top right Combobox you can select your criteria, next the bind variable will be shown on the query panel.
The saving of your own custom queries in the MDS store is not working (yet) with this DataControl. You will get a viewobject error. And I can't define a list of values on an attribute, so no nice combobox in the query panel.
The second part of this blogpost will show you, how you can change a department of a employee. Here you can see that the employee entity has the department entity as attribute( no dept_id attribute).
Drag the empFindAll operation on the page and choose for ADF Form
You can see that there is no combobox option for the department entity but you can include its attributes.
On runtime it will look like this.
I removed the entity attributes of Dept and drag the dept attribute from the DataControl on the Form and choose for ADF Select One Choice.
The Base Data Source is the dept entity inside the Employee entity and add a new other department operation as List Data Source
Add the data mapping and display some department attributes.
This time a combobox is displayed and you can change the department on the employee
That's all for now.
Tuesday, June 7, 2011
EJB and ADF Java or EJB DataControl features in JDeveloper 11gR2
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
An overview of the entity attributes with it's types.
You can define and change the entity mappings, no need to do it in the persistence.xml wizard.
The persistence.xml entity editor has some extra configuration windows like the locking, Caching, Installation, Converters and the Advanced window
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.
Unless you want to change the default values. Select one of the methods and press the edit button
The editor is much better and the attribute windows contains a lot of new options like Validations Rules, Add a Transiet Attribute.
You can add Attribute Checks or Rules just like ADF BC
Add your own View Criteria ( like in a viewobject of ADF BC ) which you can use in a Query Panel
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.
<env-entry>
<env-entry-name>ScottSessionEJB-provider-url</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>t3://127.0.0.1:7101</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/ScottSessionEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<remote>nl.whitehorses.ejbdc.model.services.ScottSessionEJB</remote>
<ejb-link>ScottSessionEJB</ejb-link>
</ejb-ref>
That's all for Part 1, next time we can gonna use the ADF EJB DataControl in a JSF Page.
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
An overview of the entity attributes with it's types.
You can define and change the entity mappings, no need to do it in the persistence.xml wizard.
The persistence.xml entity editor has some extra configuration windows like the locking, Caching, Installation, Converters and the Advanced window
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.
Unless you want to change the default values. Select one of the methods and press the edit button
The editor is much better and the attribute windows contains a lot of new options like Validations Rules, Add a Transiet Attribute.
You can add Attribute Checks or Rules just like ADF BC
Add your own View Criteria ( like in a viewobject of ADF BC ) which you can use in a Query Panel
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.
<env-entry>
<env-entry-name>ScottSessionEJB-provider-url</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>t3://127.0.0.1:7101</env-entry-value>
</env-entry>
<ejb-ref>
<ejb-ref-name>ejb/ScottSessionEJB</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<remote>nl.whitehorses.ejbdc.model.services.ScottSessionEJB</remote>
<ejb-link>ScottSessionEJB</ejb-link>
</ejb-ref>
That's all for Part 1, next time we can gonna use the ADF EJB DataControl in a JSF Page.
Subscribe to:
Posts (Atom)