File attachment using Adf faces, EJB3 and Oracle XE database Part II

continued..

Step # II Create Entities from Database Tables,Session Bean & Data Controls
Creating Entities from database table
 


Create entities from table
  
 

Create database connection and provide the information of your XE Database
 


Select PERSON and ATTACHMENT tables to create entities
  
 

 


 


.
 
 

Entites should be created.
 You need to add Sequence annotation and define relationship of ATTACHEMTN table with PERSON table as follows.


  

  Creating Session bean


  


  

 


  We Also need to add following functions into our session bean


Then expose these functions to remote and local interfaces
Click on Structure, right click on function, click on EJB(N) and then properties you will see the dialog

Check on both checkboxes and click on OK button, the methods should be generated in remote and local interfaces. do the same with all newly added functions.
Now rebuild the model
Creating datacontrols
Right click on FileUploadFacadeBean and click on "Create Data Control" then click OK button
Data controls should be created.
To be continue -->
Coming up next "Taskflow for file upload popup"

Comments

Popular posts from this blog

Unable to create a server socket for listening on channel "Default[4]". The address 0:0:0:0:0:0:0:1 might be incorrect or another process is using port 8001: java.net.BindException: Address already in use: JVM_Bind.

[Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.

ERROR: No j2ee modules detected in EAR archive. Deployment aborted. == (oracle.jdeveloper.deploy.VetoableDeployException)