Thank you for visiting! If you liked the site, please add a bookmark, else add a critical comment! Would you like to visit Greece? Traditional Greek flag This real estate site is only available in Greek! The holy mountain

Thursday 9 September 2010

Comments on Project Management Body of Knowledge, PMI

On  the bright side, the text is well written,  in American English and  neatly organized, without any misspellings or errors. Its style is formal and actually contains all there is to know, in order to sit for the project management institute examinations. Its scope is by far more general than the compTIA Project + exam guide, which  focuses mainly on IT projects. The forth edition is revised and now includes new additions, such as requirements gathering.
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 bright side, the text is well organized, without many misspellings or typographical errors. The book aims to graduate level readers and researchers. It offers a wealth of information, bibliography references and chapter notes.
 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]
<2010-09-08 16:00:18.4--ServerSession(1576505)--EclipseLink, version: Eclipse Persistence Services - 2.0.2.v20100323-r6872>
<2010-09-08 16:00:18.416--ServerSession(1576505)--Server: WebLogic Server 10.3.3.0  Fri Apr 9 00:05:28 PDT 2010 1321401 >
<2010-09-08 16:00:18.837--ServerSession(1576505)--file:/C:/Users/Nick/AppData/Roaming/JDeveloper/system11.1.1.3.37.56.60/o.j2ee/drs/ejb3inaction/ModelEJB.jar/_Model login successful>
0    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'] INFO  PlaceOrder_i7ibfi_Impl  - ******************Order confirmed!**************


In case you prefer working with Eclipse, the process is quite similar. See for example:
http://snippets.dzone.com/posts/show/3248
Finally, if you need more tips about appenders:
http://www.mobilefish.com/developer/log4j/log4j_quickguide_appenders.html

https://logging.apache.org/log4j/2.x/