By W.ZH Sept 2011
Refer to the Andrejus Baranovskis and Putten’s blog, he has very good example for the Buisiness Event From ADF-BC Entity Object. Links are here:
I have downloaded his example and tried it, here are some notes for it.
1. Entity Object has ability to config and trigger the buisiness events to SOA Suite, easy to use.
2. I have done some changes to his example as it has some issues when I tested it, such as it links a remote service to call, which is noise in the example. and which uses old version DB of “hr” of the Oracle database example. So when I deployed the samples, it just does not run.
3. I put my working sample copy to here, you can download free
SalaryManagement is one SOA composite application to receive the event.
SalaryUpdateRemote2 is the web application to create and publish the event.
4. You need to change the DB config info to point to your IP address and make it run.
5. You need to deploy the SalaryUpdateRemote2 to your SOA server, such as soa_server1, which is my SOA composite appllications runs, as event publishing need to access the EDN in the SOA server context. Publishing EO’s application can not deploy to other server, such as AdminServer, it will get nullpointerexception when create event.
6. Then you can go to http://yourIPaddress:8001/suremote/faces/main.jspx to access the test main page and to update employee’s salary, then you will see that an event is received by the SalaryManagement.
7. When you deploy the project through the jdeveloper to the SOA server, you might find some issue to run , such as
By W.ZH Sept 2011From SOA Dev guide, we can have two ways to call the EJB – by SDO WSDL or by java interface. For the second method, I think best article is from Lucas article at here :http://technology.amis.nl/blog/8142/calling-an-ejb-from-a-soa-composite-application-using-the-ejb-binding-based-on-java-interface
I have follow his way to build the sample in Jdev 126.96.36.199, there are a bit jdev UI difference. But all things can work well together. I have upload my two projects to here:
You can download and try out.
other link might be useful:
By W.ZH Sept 2011
When i have one project ADF BC in Jdeveloper, config datasource and it can work, then i deploy this project into WLS server 188.8.131.52, and also config the right Datasource in WLS. but when this project start to run ti get this error:
To read here last step:
To ensure that the credentials that you supply in the database connections for your ADF Application are deployed and include the password, add -Djps.app.credential.overwrite.allowed=true to the JAVA_PROPERTIES entry in the
By W.ZH Sept 2011
When I use the Configuration.createRootApplicationModule to access the ADF-BC Application module client method. I get this kind of exception:
java.lang.ClassCastException: oracle.jbo.common.DefaultSessionContextImpl cannot be cast to oracle.jbo.SessionContext.
This exception happens only after several times client code running fine. As my code is a EJB timer, I can see it runs very good to open the AM method at the first several times timer call, but then get this exception and the timer just does not work anymore.
Please refer to this link: https://cn.forums.oracle.com/forums/thread.jspa?threadID=995384 . It gives some background knowledge and where to look for solution. The fusion dev guide 11gR1 chapter “40 Application State Management”, have all the things you might need to understand.
For my specific case, what I do to solve this issue on my AM :
Go to MYAM —> Configuration–>Edit MYAMLocal (DS settings for AM) –>Pooling and Scalability–>Disconnect Application Module Upon Release. I check this option for my AM, redeploy my application and this issue disappears.
By W.ZH, Sept 2011
When I develop the ADF BC code, I got this error “JBO-25014: Another user has changed the row with primary key ”. My project is based on the 184.108.40.206 release, both Jdev and Weblogic server.
The issue normally is caused by the data merge conlict to one EO, often when ur code is very complex. Read these chapters in the adf dev guide will help u understand it more.
Related Chapter in the ADF developer guide
4.10.11 How to Protect Against Losing Simultaneously Updated Data
40.11.1 How to Set Applications to Use Optimistic Locking
You should notice that this kind of error, key. 222 is the primary key for you conflict object cause the DB transaction commit error. By this, you can know which table/EO/VO cause the issue. (Just because in one transaction, you normally will change and read many VO/EO/table data.).
So get your Enitiy Object define and find out whiich filed is used as the change indictor in the EO, Normarlly we use the “Updated On” timestamp as the change indictor for the EO. So you can check the check box of Refresh After Insert and Refresh After Update options in the Edit Attribute dialog. Then try again. This mostly can solve this issue.
By W.ZH Sept 1 2011
When I use the Clob and Blob in the DB, such as try to use ADF-BC to retrieve them out , it can not be converted to string from the blob domain object. System log shows that read out blob data is a weblogic.jdbc.wrapper.Clob_weblogic_jdbc_base_Base Object. So it gets conversion error.
Another problem you may facing is that, when you try to write a clob data into the DB by commit, you get an error like this:
“java.lang.NullPointException at oracle.domain.ClobDomain.writerCharsToClob (……)”
This issue also is caused by same reason.
In the Data Soruce configuration In Weblogic, there is a flag can control this:
Admin Console –> DataSource–> your DS–> Connection pool –>Advanced–>
There is check box for “Wrap Data Types”, uncheck this , restart your WLS to test again. you will see the db data readout will be sql blob….