On the bright side, the book offers a plethora of web resources, apart from the textbook itself. The online supplements are actually a way of previewing it by studying the material mentioned, before buying the book. The text is well organized with a few spelling errors. It delves deeply into XML code details, such as creating the xsd files and editing them. The historical review serves well as an introduction, presenting both the evolution of technologies and relevant acronyms, such as SLA, SCA and so on. Moreover, the step by step guidance offered, is most of the times, easy to understand and follow. Furthermore, some parts of the source code is available online, including the intermediate steps. The chapter about complex event processing is remarkable, however one needs Eclipse Galileo, not Helios, to follow the hands on guidance.
On the dark side, some sections are too long to read. Once you are done with the printed text, the online supplements must follow. Besides, the huge volume of information is often hard to manage, therefore rather messy. Some parts of text are duplicated, some others missing. For instance, on page 74 it reads: "Details for the configuration of JMS, JDBC, and UMS can be found online in Appendix C." which has been actually until recently missing. In chapter 7 some errors are reported, due to missing steps, or xsl files and a misleading image, but not yet confirmed. In addition, parts of the source code are missing, like the XML file SimplePatient.xsd mentioned on page 109. Moreover, some spelling errors are critical, omitting an 'a' from 'asynchronous', surely changes the meaning! Some crucial xpath expressions have typographical errors as well. Web services presented in the text such as ConsultWithHealthInsurers in chapter 11, are not implemented. Furthermore, in chapter 13, page 448: "The wiki provides configuration details for setting up a local e-mail server with these domains and accounts based on the JavaEmail project" but no such details actually existed until recently. Such errors, or missing information prevent the reader from completing the practice, build the necessary self confidence and continue. Unfortunately, the source code for chapters 10 and above has not been available until recently, due to broken links.The code for chapter 15 is still missing. Although most times the known bugs of soa suite are mentioned, this is not true for the ADF service data objects examples of chapter 20.
All in all, the text is of average quality, the author has striven to equally balance the theoretical and practical views of the subject. It offers an introduction to XML, XPath too, some of hands on practice. Hence, the book is definitely among the top choices for the reader who would like an introductory book, but clearly inferior to the Getting started with SOA 11g, as far as quality and precision of hands on practice is concerned. As far as quantity, the difference in number of pages speaks for itself!
Wednesday, 27 October 2010
Monday, 18 October 2010
JDeveloper 11g: Making use of Http Analyzer for testing and debugging
Anyone who has developed a JEE or SOA application, sooner or later faces some kind of unexpected, or strange behaviour of the system under development. However helpful the audit process screens of the weblogic server, once you enter and submit the sometimes numerous input values, one is not allowed to tamper with the request values anymore; you just wait until you get hopefully a response, or an error. An interesting , but often overlooked, alternative is Http Analyzer. It lets you save some time, by copying the request so that you don't have to enter all values from scratch, you can edit the value of interest and resend your modified request. Let's see some specific examples.
In order to quickly set it up, you go to "Tools" menu and click on "Preferences" in JDeveloper 11g as shown in the image. You need to copy the "Listen on port" value, which is 8099. Next, you need to setup the browser of your choice. The images below show the screen shots for Mozilla Firefox, I suppose finding your way in IE or other browser won't be such an onerous task!
Again click on "Options", then on "Advanced", "Network" and lastly on "Settings" to reach the connection settings window as shown . You need to select "Manual proxy configuration", enter your computer name, and paste the port number you copied before, i.e 8099. The "No proxy for" section must not contain any entries, such as localhost, nor 127.0.0.1, because in that case Http Analyzer will only analyze your internet requests! When you are done with debugging, you might need to reenter here your old values. That means you need to save them, i.e in a new back up text file! For an alternative more elegant configuration using profiles, you can consult the JDeveloper documentation, by searching for"Configuring External Web Browsers"
In order to quickly set it up, you go to "Tools" menu and click on "Preferences" in JDeveloper 11g as shown in the image. You need to copy the "Listen on port" value, which is 8099. Next, you need to setup the browser of your choice. The images below show the screen shots for Mozilla Firefox, I suppose finding your way in IE or other browser won't be such an onerous task!
Again click on "Options", then on "Advanced", "Network" and lastly on "Settings" to reach the connection settings window as shown . You need to select "Manual proxy configuration", enter your computer name, and paste the port number you copied before, i.e 8099. The "No proxy for" section must not contain any entries, such as localhost, nor 127.0.0.1, because in that case Http Analyzer will only analyze your internet requests! When you are done with debugging, you might need to reenter here your old values. That means you need to save them, i.e in a new back up text file! For an alternative more elegant configuration using profiles, you can consult the JDeveloper documentation, by searching for"Configuring External Web Browsers"
Testing a trivial ADF form
Next, you start the application, using the "Run project" button, and click the "Start HTTP analyzer" button. The small form of the ADF ejb bidding application window appears. You should now see the output in the log window. If you enter the form values and submit, the HTTP analyzer captures all submitted values. You can now copy the request, edit only the bidder's name for instance, and resend.
Testing a plain SOA component
For the second example, you need to reenter your old settings to your browser(i.e. No proxy). The request values will be submitted by JDeveloper itself, by right clicking on the service, as shown.
Here a US stock exchange price in dollars, i.e. for OTE or GE, is converted into a different currency, i.e. EUR or GBP for British pounds. You can see the request and response values as well. As mentioned before, you need to copy the request, modify only where necessary and resubmit.
Although the examples given are deliberately simple, a small relevant quotation will be given, concerning the importance of retaining the input parameters, and another alternative as well. I quote from the Oracle SOA Suite 11g Developer's guide: "If you have a very complicated interface, you may not want to have to enter the parameter values every time you test the composite. In 10g, there was a facility to set a default input to a BPEL process. Unfortunately, there is no such facility for 11g composites. In order to avoid retyping complex inputs, the input can be saved to a file and then pasted into the test dialog every time...". Finally, if your needs are bigger, you might consider another alternative testing tool like SOAPUI which is available online.
Here a US stock exchange price in dollars, i.e. for OTE or GE, is converted into a different currency, i.e. EUR or GBP for British pounds. You can see the request and response values as well. As mentioned before, you need to copy the request, modify only where necessary and resubmit.
Although the examples given are deliberately simple, a small relevant quotation will be given, concerning the importance of retaining the input parameters, and another alternative as well. I quote from the Oracle SOA Suite 11g Developer's guide: "If you have a very complicated interface, you may not want to have to enter the parameter values every time you test the composite. In 10g, there was a facility to set a default input to a BPEL process. Unfortunately, there is no such facility for 11g composites. In order to avoid retyping complex inputs, the input can be saved to a file and then pasted into the test dialog every time...". Finally, if your needs are bigger, you might consider another alternative testing tool like SOAPUI which is available online.
Wednesday, 6 October 2010
JDeveloper 11g: Using assert() for testing and debugging
Assertions are a very useful feature for testing and debugging, but are rather neglected. Instead of using loggers to provide continuously diagnostic messages in critical programme flow points, or even worse if- else - System.out.println() constructs, assert statements can only be enabled only when necessary. Thus, you avoid wasting valuable resources. In addition, you do not need to add any jar libraries to your IDE project, or application server to use it. In order to use assert, you need to pass the -ea argument, call a non void java method and check a Boolean condition. For instance: assert(Month < 13). Nonetheless, you can not use an assert statement to check the values passed to public methods. Consider for example the following code snippet, from an business components, employees entity object:
protected void doDML(int operation, TransactionEvent e) {
if (operation == DML_UPDATE) {
...
histStartDate = row.getEndDate();
/*Check whether end date equals current date*/
/*if (histStartDate.equals(new Date(Date.getCurrentDate()))){
System.out.println("End date equals current date!");
}*/
assert(histStartDate.equals(new Date(Date.getCurrentDate() ) )) :
"End date equals current date! ";
Another trivial example from an ejb client follows:
public class PlaceBidClient {
public static void main(String [] args) {
...
Bid bid = placeBid.addBid("Lila", Long.valueOf(100), 2001.50);
System.out.println("Bid Successful, BidId Received is:" + bid.getBidId());
assert(bid.getBidId() == 502):"BidId Received is "+bid.getBidId();
}
}
Finally, when run, the log output reads:
-javaagent:C:\Oracle\Middleware\jdev_11gR1\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-0.jar -Duser.language=en -Duser.country=US -ea actionbazaar.buslogic.client.PlaceBidClient
Exception in thread "main" java.lang.AssertionError: BidId Received is 393
at actionbazaar.buslogic.client.PlaceBidClient.main(PlaceBidClient.java:24)Bid Successful, BidId Received is:393
protected void doDML(int operation, TransactionEvent e) {
if (operation == DML_UPDATE) {
...
histStartDate = row.getEndDate();
/*Check whether end date equals current date*/
/*if (histStartDate.equals(new Date(Date.getCurrentDate()))){
System.out.println("End date equals current date!");
}*/
assert(histStartDate.equals(new Date(Date.getCurrentDate() ) )) :
"End date equals current date! ";
Another trivial example from an ejb client follows:
public class PlaceBidClient {
public static void main(String [] args) {
...
Bid bid = placeBid.addBid("Lila", Long.valueOf(100), 2001.50);
System.out.println("Bid Successful, BidId Received is:" + bid.getBidId());
assert(bid.getBidId() == 502):"BidId Received is "+bid.getBidId();
}
}
Finally, when run, the log output reads:
-javaagent:C:\Oracle\Middleware\jdev_11gR1\jdeveloper\..\modules\org.eclipse.persistence_1.0.0.0_2-0.jar -Duser.language=en -Duser.country=US -ea actionbazaar.buslogic.client.PlaceBidClient
Exception in thread "main" java.lang.AssertionError: BidId Received is 393
at actionbazaar.buslogic.client.PlaceBidClient.main(PlaceBidClient.java:24)Bid Successful, BidId Received is:393
Sunday, 3 October 2010
A free site for sports funs: http://www.woop.gr/
This is a new free online Greek sports channel covering both national and international soccer, basketball matches, motorcycle racing events and so on. Since Eurosport channel now asks for subscription and payments, this could be an interesting alternative, in case your spouse insists on watching that boring soap opera. Most text is in Greek, but you can find your way around. Try clicking on "Live" links, in order to find something interesting to watch. So, this is it: http://www.woop.gr/
Finally, if you would like to try other online tv channels there is http://2onlinetv.com.
Finally, if you would like to try other online tv channels there is http://2onlinetv.com.
Subscribe to:
Posts (Atom)