Saturday 11 September 2010
Beware of Greeks Bearing Bonds Business: vanityfair.com
Thursday 9 September 2010
Comments on Project Management Body of Knowledge, PMI
On the dark side, some of the paragraphs can be so long that studying it, might become a drudgery. Moreover, there are no questions and answers, exercises or problems for the reader to solve. in order to reinforce learning.
All in all, this is the bible of the manager, full of information, but its formal structure resembles more of a reference manual, not a course book to prepare for the exam.
Comments on Mesoscale Meteorological Modeling, 2nd Edition Volume 78 By Roger A. Pielke, Sr.
On the dark side, the thermodynamics chapter has been reported to have some ambiguities about i.e. conservation of heat. During my postgraduate studies I was assigned to study the 1rst edition of the book, so as to be examined orally. Thus, in the absence of exercises or questions, I had to write my own, corresponding to each paragraph of text. I suppose having spent such a large amount of time and effort made me wonder, whether the newer edition offered such supplements. I am afraid it doesn't!
All in all, the book is advanced text and the reader is assumed to have perfect knowledge of several topics, especially statistical physics. Its second edition proves its success, but as far as the student is concerned, adding some sort of practice would mean great help.
Wednesday 8 September 2010
JDeveloper 11g:Using Log4j in stateful EJB
Since the use of log4j has proven to be a very popular subject for the readers, another code snippet for your Model project will be given as an example. In case you prefer ADF business components, you can find an example too. If you 'd also like an example for a backing bean for your ViewController project this time, you can have it here.
First, one has to double click the project, so that the window of the libraries appears, in order to add the Log4j jar library.
Second, navigate to C:\...\Model\src to create the log4j.properties file:
# **Set root logger level to DEBUG and its only appender to A.
log4j.rootLogger=DEBUG, A
# ***** A is set to be a ConsoleAppender.
log4j.appender.A=org.apache.log4j.ConsoleAppender
# ***** A uses PatternLayout.
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
Finally, if one 'd like to use log4j within a stateful EJB class, the source code is similar:
...
import org.apache.log4j.Logger;
@Stateful(name = "PlaceOrder", mappedName = "ejb3inaction-Model-PlaceOrder")
@Remote
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
public class PlaceOrderBean implements PlaceOrder {
Logger logger =Logger.getLogger(this.getClass().getSimpleName());
...
@Remove
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public Long confirmOrder() {
...
em.persist(order);
if (logger.isDebugEnabled())
logger.debug("******************Order confirmed!**************");
return order.getOrderId();
}
...
}
Thus, one gets the following log output from the integrated Weblogic server:
Run startup time: 9656 ms.
[Application ejb3inaction deployed to Server Instance IntegratedWebLogicServer]
0 [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO PlaceOrder_i7ibfi_Impl - ******************Order confirmed!**************
Finally, if you need more tips about appenders:
http://www.mobilefish.com/developer/log4j/log4j_quickguide_appenders.html
Sunday 5 September 2010
Comments on Teach yourself JavaScript in 24 hours by Michael Moncur, 4rth Edition
On the dark side, the reader has to know beforehand, some programming essentials, since the text does not analytically present some subjects in great length and depth, i.e. some complained about the coverage of loops.
All in all, the book is a success, now in its 4rth edition, offering an introductory course in JavaScript for experienced programmers. Moreover, it is very useful as a reference, offering a wealth of information in its appendixes: other JavaScript resources, tools etc.
Saturday 4 September 2010
Comments on Oracle Application Server 10g: J2EE Deployment and Administration, by Michael Wessler, Erin Mulder, Rob Harrop, Jan Machacek, Apress
On the dark side, the text resembles more of a manual than a learning course. It has no tutorials, nor end of chapter step by step exercises for the reader to implement on his own, in order i.e. to actually measure any performance gains. The book was published back in 2004 and I quote an interesting paragraph of its presentation text, which can be found at: http://apress.com/book/view/9781590592359
"Oracle Application Server 10g: J2EE Deployment and Administration focuses on the latest version of Oracle's fully J2EE-certified application server (previously called Oracle9iAS). Oracle Corp. is aggressively attacking this market with a new lost-cost version of the server, as well as a program to move BEA customers onto Oracle free of charge. Adoption interest is growing rapidly amidst favorable reports regarding performance and reliability."
All in all, the book might be of use to web administrators with old J2EE 1.3, already running servers. Today, its content is mostly deprecated, as OAS end of life is approaching.
Wednesday 1 September 2010
JDeveloper 10g: Deployment of JHeadstart application to OAS 10.1.2
A common demand by customers in the public sector, is keeping their usually many years old, existing application server installations intact and rarely upgrade to newer versions. Others say that buying new hardware is far too expensive. Sometimes compatibility reasons, i.e. simultaneous use of older Oracle forms applications, tie you up. Furthermore, why should one mess up a smoothly up and running 1.3 JEE application server, after all?
Developer's nightmare
The sad thing is that customers usually inform you of such requirements, only when you have already finished testing at the current version of the J2EE container of the Oracle Application Server or OAS, the one embedded in JDeveloper (that is in our case: 10.1.3) and the contemporary stand alone J2EE 1.4 OC4J instance!
Whatever the extra cost of effort, time and money, the developer is to conform to the customer rules. The integrated scope changes control process mentioned in the Project Management Body of Knowledge are vastly considered purely theoretical in Greek software houses. In practice, the competition is very hard, no manager can afford a displeased customer. On the other hand, bear in mind that plain programmers are dispensable. I only wonder what are the working conditions abroad? Please respond, with as many details as possible!
So, if you are finally stuck to the older version of OAS, you might consult a brief deployment guide to a test server at :
http://code.google.com/p/nickaiva-blogspot/downloads/detail?name=DeployToOAS_v2.pdf&can=2&q=
Perhaps reading it, might save you some time and frustration...
Further critical references concerning ADF:
Tales from the trenches by Dr. Dorsey. Coauthor of JDeveloper 10g hanbook.
Tuesday 31 August 2010
Comments on SCWCD Exam Study Kit Second Edition Java Web Component Developer Certification Hanumant Deshmukh, Jignesh Malavia
On the dark side, the text is sometimes not easy to understand. This is definitely no book for beginners, such as the one offered by the Head First series. The catalog of the errata page is quite long too, especially for the first prints.
All in all, the book which was published in 2005, is surely not a primer. It could also be used as a reference later in your career, but you might initially need a lower level text to read, before actually attempting to sit for the exam.
Monday 30 August 2010
Comments on Fusion Developer Guide. by F.Nimphius, Lynn Munsinger
On the dark side, the full source code of the book is not available for download, with only a few exceptions. The errata page has vanished for a while, so an older version perhaps incomplete, is available here. The book has not a tutorial step by step, practice on your own form, like the one by D. Mills. Sometimes, the paragraphs are so long and purely theoretical, that reading becomes tedious.
All in all, the book seems like a brief printed synopsis, of the official Oracle fusion Developer guide pdf file, available online for free in OTN. Whether you would like to have a printed version of it as well, is only up to you!
Further critical references concerning ADF:
Tales from the trenches by Dr. Dorsey. Coauthor of JDeveloper 10g handbook.
Performance and scalability criticism by several authors
ERRATA: "Oracle Fusion Developer Guide - Building Rich Internet Applications with Oracle ADF Business Components and ADF Faces" (ISBN - 978-0-07-162254-7)
Chapter 01:
Page 27 | Addition to using scope prefixes in EL when reading memory scope attributes |
The book has it correct. However, we want to make sure memory scope prefixes are understood correctly and that there is no question left open in regards to managed beans: Accessing a managed bean in a standard servlet scope like sessionScope or requestScope using the scope as a prefix fails if the bean instance does not exist. Thus, bean reference like #{sessionScope.myBean} may fail while #{myBean} always succeeds. The reason for this is that #{sessionScope….} and #{requestScope…} reference a Map in memory and not the JSF framework. Managed beans must be instantiated before they become available in the memory scope, which means they need to be accessed through JSF. Luckily, JSF does not allow to configure two managed beans with the same name in different scopes. So even without a scope prefix, there is no risk that application code accidentally accesses the wrong object.. Note that using ADFc specific scope, like viewScope and pageFlowScope, you always need to use the scope name as a prefix in the EL. |
Chapter 03:
Page 100 | Use Case; Using af:subform in ADF Forms - new sample provided |
A complimentary sample is posted on ADF Code Corner implementing this use case: See it here |
Chapter 05:
Page 168 | Creating and Registering a custom Exception Handler |
The custom exception handler example extends AdfcExceptionHandler, which is a class in an internal package. The risk associated with classes in internal packages is that changes may be made by Oracle without further notice. Oracle updated the upcoming version of the product documentation, "Oracle Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework 11g" with a sample that explains how to configure custom exception handlers, following our example in the book. They corrected the use of AdfcExceptionHandler by using ExceptionHandler, the class that is good to use with no strings attached. The sample thus would look like import javax.faces.context.ExternalContext; Note that using ExceptionHandler, the handleException method does not call super.handleException(...) but throws the exception so it is handled by the next registered exception handler, which most likely then is the internal AdfcExceptionhandler instance. The ExceptionHandler, class does not implement the handleException method itself and only acts as a template for defining ADF task Flow exception handlers.
|
Chapter 06:
Page 199 | Accessing the Task Flow Binding from Java |
The code example casts the Task Flow Binding to DCTaskFlowBinding, which is an internal class used by the ADF framework. To avoid using internally packaged classes, yu can cast the region binding to DCBindingContainer, which is the public framework class that DCTaskFlowBinding extends. BindingContext bctx = BindingContext.getCurrent(); The primary use of accessing the region binding is to get a hold of the referenced binding container and its defined bindings, which you can also do using the DCBindingContainer. There is some more infromation available using DCTaskFlowBinding, but these you can get from other APIs, like ControllerContext as well.
|
Chapter 09:
Page 309 | Note says: If the table is a child of the af:panelCollection component, then an implementation of the multiple column sort use case already exists using the PanelCollection View | Sort | Advanced menu option |
The book has it correct and the functionality exists. However, you need to set the table column selection to either single or multiple. This is not apparent because within the chapter, the column selection is enabled at the beginning to handle a different use case. The requirement to enable column selection has nothing to do with sorting but exists in the current JDeveloper 11g release. A bug has been filed to lift this requirement. | |
Page 309 | Selection Event |
The example shows you how to synchronize the table component row selection with the current row in ADF binding layer using Exression Language. If you prefer a pure Java solution, we released a generic Java handler example on ADF Code Corner: read more. | |
Page 296 | How to navigate in specific row in table. |
ADF Code Corner has an improved version of the sample in the book that is worth looking at. The sources are available for dwenload as well. See here. A related sample is here. | |
Page 281 | "invokeMethodBinding" should be "invokeMethodExpression" |
Chapter 9 uses a helper method to invoke method expression. The main method "invokeMethodExpression" has a overloaded method with a simplified signature. Unfortunately the name of this method in the book is "invokeMethodBinding". It should however look as shown below to work with the samples given in the book /** So please put a note on the first method name that the name has changed as shown above. | |
Page 311 | What You Should Know About the Data That Is Exported to Excel |
In this section of the book we provide a hint of how to add an Excel fomular to the exported table cell data so that it gets propery formatted when opened in Excel.This hint stopped working in the latest release of Oracle JDeveloper, which is Oracle JDeveloper 11g R1 PS2 (build number is Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660) because of a bug fix that prevents the export of hidden output text content. We assume that it requires a new enhancement request to properly implement the option to add excel formulars (adn some users unfortunately already started suffering from the side effect this bug fix has - including this book). |
Chapter 15:
Page 483 | Typo "exiting" instead of "existing" |
Luc Bors from Amis in the Netherlands found this interesting typo in the book: “A standard JSF component that is built from exiting ADF Faces Components …” . This of course should be "A standard JSF component that is built from existing ADF Faces Components ..." | |
Chapter 19:
Page 601 | Registering the adf-js-partition.xsd Schema |
The adf-js-partitions.xsd schema has been moved to <wls_jdev_install>\oracle_common\modules\oracle.adf.view_11.1.1\adf-richclient-api-11.jar | |
Page 601 | Creating te adf-js-partitions.xml file |
The custom adf-js-partitions.xml file structure has a typo and wrong xml tag. The correct XML is shown below
|