Feed aggregator

Manual Depreciation Override in Assets

Jo Davis - Wed, 2006-04-12 18:34
Latest sexy thing I came across:

Oracle Assets mini-pack 11i.FA.K (2398923) contains the Manual Depreciation Override functionality.

In a nutshell:
- set the profile option FA: Enable Depreciation Override to Yes
- write pretty sql to populate fa_deprn_override with a record for each asset per period per book where the depreciation calculation should be overriden with your magically calculated number

and you're done.. no more frigging around with unplanned depreciation after the event to try and get the accumulated depreciation and depreciation expense to the desired value. How simple is that? I'll let you know if it actually works ;)

Eternal Mysteries of iProcurement

Jo Davis - Mon, 2006-04-10 00:49
Okay - I confess - I forgot to update this blog thingie ... again.... :)

My latest craze - iProcurement on 11.5.10, haven't done this one since 11.5.8 so it's a bit sexier and yet again the screens have changed - woohoo!

New things I like:
- Non-Catalog templates
- Using AME for Requisition Approval

New things I dislike:
- The new homepage isn't as easy as the 11.5.8 one
- Personalization just gets more complicated every release

Old things they still haven't fixed:
- Trying to populate the AFF is like trying to pull teeth, that saved list of top combinations is just rubbish, you still have to customise the Account Generator to get the right combination first time or the users are stuffed - it doen's remember the segments that it was able to generate so they start again from scratch. Marvellous if they happen to work for the finance department and know their full accounting flexfield, pain in the neck if they're a normal human who has no clue! (End of rant)

Google Toolbar Installed

Scott Schwab - Thu, 2006-04-06 07:26
Google Toolbar Installed, testing sending blog entries from a tool bar buttonScott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

unit testing tools and maps

Scott Schwab - Wed, 2006-04-05 20:14
I have been quoted. On unit-test.com, my early evaluation of Qute unit testing software has been posted. I have found the software very useful in the last few days, as I have been grinding through a variety of xml fragments in my testing.I am building a PL/SQL package that takes XML fragment, say apple and builds a dynamic query, such asSELECT Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Facelets 1.1.2 is out!

Adam Winer - Thu, 2006-03-30 11:31
As Jacob Hookom just announced, Facelets 1.1.2 is now available. This is a major milestone for Facelets: the big issues have been nailed, templating's solidified, and excellent features like <ui:repeat> are in there too. Give it a whirl!

(And, for this blog, that "build before restore" feature that's part of saving JSF state saving has its first public appearance here too.)

Some notes for project management

Scott Schwab - Thu, 2006-03-30 09:05
Over the last few days of project schedule reviewing, I have learned some lessons in project management.If you have a person you will need on a project,1) Find something for them to do the on project, early on, to get them involved, busy, and off of the bench of people available for assignment to other projects.2) Tie their work to a deliverable, and if possible, the deliverable directly to a Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Oracle Riddles: Now that is interesting.

Eric S. Emrick - Wed, 2006-03-29 21:11
A process can prevent me from staking the claim for another. Users sometimes need me to know if they can secure a spot where another process may have been before. Needless to say, I am a pretty big deal, and users are very interested in me. However, when some stop by for a visit they often feel I haven't cleaned up very well. Do you know what I am?

ADF Faces – First Impressions

Brenden Anstey - Fri, 2006-03-24 23:12
The much anticipated JDeveloper 10.1.3 was released at the end of January 2006 and definitely lived up to expectations among the JDeveloper community. The slick new interface boasts some really great features including significant enhancements in the code editor and overall feel of the IDE.

So what about Faces? ADF Faces is based on the JavaServer Faces industry standard framework. An open source implementation of JavaServer Faces called MyFaces has been [donated] to the Apache Foundation by Oracle.

The persistence layers offered by JDeveloper are ADF Business Components and Toplink. Oracle has released fully working example application called the SRDemo which is a simple service request system. The aim of the SRDemo is to solve most of the design woes faced by any developer starting out on green fields J2EE web application. SRDemo is written in ADF Faces (JSP) using TopLink and use J2EE container security for authentication and authorisation.

Why TopLink? TopLink is a POJO (plain old java object) based approach to creating an object-to-relational persistence layer. TopLink uses and EJB (Enterprise Java Bean) session façade and provides a full declarative (XML) persistence layer defined in what’s called a TopLink map. One really nice feature of TopLink is named queries; Named queries encourage the reuse of TopLink entities by exposing different operations on the entity (such as setting or changing conditions) by exposing methods through the Session Façade bean. I was impressed with TopLink, because it has some original and well implemented ideas. The POJO approach unpacks all the complexity which is hidden in ADF BC, which can be a bit daunting when starting out with the TopLink framework.

There are some significant improvements with ADF BC including some out-of-the-box goodies which either didn’t work or were a headache to implement in 10.1.2. Read-only view objects are great as well as dynamic view criteria. For those coming from an Oracle Forms or non-OO background, ADF BC is an easier transition than TopLink and is a mature and robust framework to go with.

The actual ADF Faces user interface can be implemented in two ways, a JSP (Java Server Pages) or a JSPX (XML Document). The faces lifecycle and faces-config.xml implements the controller layer providing the interaction between the model and view layers. ADF Faces provides an abundant set of UI components which give a consistent looking and rich user interface. Strong support for expression language makes binding components to the model a breeze. The backing bean and managed bean concept has also greatly simplified managing events.

The Tao of Oracle

Mihajlo Tekic - Fri, 2006-03-24 11:11

The Oracle Masters have no mind of their own.
They are aware of the needs of others.
They are good to users who are good.
They are also good to users who are not good.
Because Virtue is goodness.
They have faith in servers that are faithful.
They also have faith in servers that are not faithful.
Because Virtue is faithfulness.
The Master is shy and humble - to the world he seems confusing.
Others look to him and listen.
He behaves like a little child.

more about The Tao of Oracle by Roby Sherman

Usings Sets with UIData

Adam Winer - Wed, 2006-03-22 18:24
One of the more personally surprising usability complaints I've heard was that the JSF UIData component does not support Sets. I hadn't anticipated that one. The underlying reason is that UIData is built around indexed data. For example, you can ask it to show rows 10,000 through 10,099. Such an operation would be nightmarishly expensive in a Set:

Iterator iter = collection.iterator();
for (int i = 0; i < 10000; i++) { iter.next(); }
// Hey, now we can start reading our data!

But, hey, we still got it wrong: we should have supported it. Yeah, it'd be slow - O(N) where N is the size of the set, not the amount of data actually displayed at one time - but the ease of use argument is compelling.

That said, there's nothing stopping you from using Sets with UIData right now... if you use the following class:

import java.util.AbstractMap;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.RandomAccess;
import java.util.Set;

public class ListFromCollection
public ListFromCollection()
_map = new MakeList();
_size = _DEFAULT_SIZE;

public Map<Collection, List> getList()
return _map;

public int getSize()
return _size;

public void setSize(int size)
_size = size;

private class MakeList extends AbstractMap<Collection, List>
public List get(Object o)
if (!(o instanceof Collection))
return null;

// Just send RandomAccess lists out; wrap any other Collection
// into a List
if ((o instanceof List) &&
(o instanceof RandomAccess))
return (List) o;

Collection c = (Collection) o;
if (c.isEmpty())
return Collections.EMPTY_LIST;

return new ListImpl(c, getSize());

public Set<Map.Entry<Collection, List>> entrySet()
// Not worth implementing at the moment; this Map is only
// accessed from
return Collections.emptySet();

static private class ListImpl extends AbstractList
public ListImpl(Collection c, int size)
_c = c;
_cSize = c.size();
if (size == 0)
_bufferSize = _cSize;
_bufferSize = Math.min(size, _cSize);

_buffer = new ArrayList(_bufferSize);
_offset = -1;

public int size()
return _cSize;

public Object get(int index)
if ((index < 0) || (index >= _cSize))
throw new IndexOutOfBoundsException();

int offset = (index / _bufferSize) * _bufferSize;
if (offset != _offset)
_offset = offset;

return _buffer.get(index - _offset);

private void _loadBuffer(int offset)
Iterator iter = _c.iterator();
int i = 0;

while (i < offset)
assert iter.hasNext();


int count = 0;
while ((count < _bufferSize) && (i < _cSize))
assert iter.hasNext();

private final Collection _c;
private final int _bufferSize;
private final int _cSize;
private int _offset;
private ArrayList _buffer;

private Map<Collection, List> _map;
private int _size;

static private int _DEFAULT_SIZE = 50;

So, what's this all mean? Well, say you want to write:

<h:dataTable value="#{mySet}">

... but that doesn't work. Just add one managed-bean entry to your faces-config.xml:


... and now, you can use sets on dataTable via:

<h:dataTable value="#{makeList.list[mySet]}">

Loading xml files with xml db

Adrian Billington - Wed, 2006-03-22 02:00
A tutorial on loading XML files into relational tables. March 2006


Scott Schwab - Tue, 2006-03-21 10:10
I have some task to add to ant, to run my PL/SQL test, luckily I found this link about it.Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Google Home Page for Me

Scott Schwab - Tue, 2006-03-21 09:38
Last night, I received my invite to build a Google Home Page. It was perfect timing as I am writing a presentation on Qute and the need for unit testing, and wanted to post it some place. A warning about power point + visio, if you are using photo clip art, watch the sizes. My initial version of the presentation was 50+ meg, fixing the photos size and resolution its is down 8 meg. Still large, Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

instrumentation and Schrodinger's cat

Scott Schwab - Fri, 2006-03-17 09:15
I am working on a presentation about need for instrumentation in production code. This morning after talking to my daughter, I realized an analogy for the need to instrument code; it is the Schrodinger’s cat paradox. When you run you applications, as it if off chewing up the CPU, you cannot say, with certainty, that it is working correctly or it is failing, so in fact it is doing both. In Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Fixing JSF state saving: Save vs. Restore

Adam Winer - Fri, 2006-03-17 00:17
(A bit of esoterica, but probably of interest here to those deeply focused on JSF performance...)

An update: I got a chance to take some timings. As expected, saving state is now much faster: 85-90% faster, roughly equivalent to the improvements in the size of the saved state. But I was very surprised to discover that restoring the view isn't any faster, perhaps even marginally slower - until I realized that was the only possible result.

Restore View has to create a full tree, starting from zero. What could possibly be faster than creating that tree from an object tree that specifies every attribute that needs to be set, every class name that needs to be instantiated? Put another way, the old restoreVIew() approach, for all of its memory inefficiencies, is essentially an equivalent workload to building the tree in the first place, and might be even faster. This new approach starts with the overhead of building the tree from scratch, plus the overhead of setting some additional state. (That additional overhead is fairly negligible, but the point remains: fixing JSF state saving doesn't make Restore View fast.)

A slight clarification, BTW: I'm not using client-side state saving a la the RI or MyFaces, which serializes the entire tree to the client. Instead, we use ADF Faces's tokenized client-side state saving - run saveSerializedView, but then stash the result on the session, and only send a token to the client. If we were using fully serialized trees, then you would get a performance boost even in Restore View, because you'd only have to unserialize a small block, instead of the whole thing.

So, does that mean that restoreView() is necessarily slow? Well, no. There are approaches to optimizing restoreView(). The most direct is optimizing building the component tree - which will help both with initial component tree creation and with restoreView(). How to do that in another post. (Hint: FacesBean and Facelets are a huge help here, too!)

64 bit Oracle Speed?

Scott Schwab - Thu, 2006-03-16 09:01
Sitting at my cube, I overhead a discussion about 64-bit Oracle, mainly about the speed increase it would bring to an application. At Hotsos last week, I was sitting in a session and I remember someone saying, (very roughtly) that "64 bit Oracle is not about speed, it is about size, and that you have to remember that all those addresses are now twice as big".The problem is, I don't remember if Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com1

Fixing JSF state saving: a progress report

Adam Winer - Wed, 2006-03-15 19:08
I've implemented the first version of an improved JSF state saving architecture, essentially what I talked about in my last post.

The very latest and greatest Facelets source code has a facelets.BUILD_BEFORE_RESTORE initialization parameter. When turned on, it changes ViewHandler.restoreView() to build the view before asking the StateManager for help.

And the latest ADF Faces code adds a new markInitialState() method to our components - which calls through to FacesBean.markInitialState(). When our MyFaces svn repository is set up, you'll be able to see this code too...

And the results? Well, one test case with a fairly large page dropped from nearly 10K of client-side state to only 600 bytes. That's more than a 90% reduction in saved state! (Presumably, CPU usage is way down, but I haven't measured that yet.)

There's still potential improvements: I could get that 600 bytes down further by overriding the state saving in UIViewRoot. Also, Jacob's suggestion to use a flat Map instead of a hierarchy would also help - currently, if one component deep in the hierarchy needs to store state, we build up a large hierarchy of mostly null Object arrays. This isn't especially expensive, but it is avoidable.

A footnote: Mike Youngstrom cogently noted in a comment to my last post that a delta approach to state saving would let us make UIData both simpler and more generic - instead of handcoding a specific set of properties to save on certain types of child components, just run state saving. Absolutely, Mike! I haven't prototyped this on our UIXTable component (which doesn't extend UIData, FWIW), but that's a great thing to try.

Raptor 1.0 takes flight

Scott Schwab - Wed, 2006-03-15 08:31
Oracle SQLDeveloper (Raptor) had its 1.0 production release on Monday, March 13. Congrats to the developers at Oracle building this very help and free tool.Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Hotsos Symposium 06, day two

Scott Schwab - Wed, 2006-03-08 00:02
Well, it is then end of Hotsos Symposium 06, day two, and I am having a great time.I have learned many things, from the good and bad of parallel processing in Oracle, from a very funny Doug Burns, to how to tell Oracle CBO's how long your PL/SQL function will take.One of the big themes this year, and probably every year, is instrumentation. Make use of DBMS_APPLICATION_INFO and such, so you can Scott Schwabhttp://www.blogger.com/profile/14014003619353346507noreply@blogger.com0

Is Oracle really quicker on Windows than Solaris?

Neil Jarvis - Tue, 2006-03-07 06:05
I installed a 10gR2 on Solaris 5.10 as a development database. The developers here have their own databases on their own P.C. One of the developers queried the speed of the solaris.

As a test I exported his schema and put it in many environments (Solaris and windows 9i and 10g)

To my amazement the windows installations always outperformed the Solaris ones both on initial loading the pool cache and subsequent runs

The test package is rather large (5000+ lines), which is used in a form to display customer details. On solaris I was typically getting an initial return time of 5 seconds and on windows, typically, 1 second.

Even subsequent runs (i.e. cached) the windows outperformed solaris.

The parameter sizes for the SGA were approx. the same and the file systems are the conventional method.

In both cases the disk configuration is local.

So the only difference being the processor speeds and Kernal coding!!!!!


Subscribe to Oracle FAQ aggregator