Dive into BC4J and ADF

Send me a mail
 Dive into BC4J and ADF    Click to see the XML version of this web page.   (Updated: 6/3/2006; 11:50:17 AM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper 10g

Search blog with Google:
 

Search BC4J JavaDoc:
 

November 2003
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
Oct   Dec

Get Firefox!

Friday, November 28, 2003

I've been working on helping debug a complex customer testcase over the last week. The problem only occurs in a very unique sequence of events, and understanding how all the view objects tie together was something that was useful. I opened the customer's project in JDeveloper 10g and dropped some of their application modules onto a new BC4J diagram and instantly could visualize how all of the master/detail relationships were hanging together. I selected some of the view object instances that their testcase was "touching" on its way to reproducing the problem, and did "Show Related Elements" and this showed me the view object definitions on the diagram, and the underlying entity object usages that they encompassed. This make quick work of understanding how all the pieces fit together. (Note: The "Show related elements" for a view object is new for 9.0.5.1 production and not available yet in the 10g preview.)

Another thing I learned about while working on this testcase was the super-cool feature we have (even in JDev 9.0.3) of conditional breakpoints. Each breakpoint has a "Conditions" tab. You can type in any expression that relates to variables you can see/watch in the debugger and make the debugger stop only when a very specific condition occurs. This is extremely useful when debugging generic framework code when you only care to stop at some generic code when a very specific case occurs. The expressions cannot call methods (except the equals() method on string-valued items), but once you get the hang of it, you'll find yourself using this feature a lot while debugging. For example, on one of my breakpoints I added an conditional expression like (all on one line in the debugger, but wrapped here for readability):

srow.mEbi.mObjName.equals("PartySiteEntity") &&
mViewDef.mObjName.equals("LocationView") &&
mQCs.mImpl.count > 1

And I stopped at my breakpoint (which otherwise would have been called many other times in other situations), only in the exact scenario that I knew was not supposed to be happening that I needed to track down. If you use the debugger's "Data" window to explore to find the value you want to make part of your conditional expression, add a "Watch" for that value, and in the watch window you'll see the dotted expression to use as part of your condition.


12:46:33 PM    



© Copyright 2006 Steve Muench.