Tuesday 27 November 2012

Oracle SOA 11g Tips And Tricks

Thought of documenting few useful advance tips to help others to save time and also for my own reference.
Question : I have deployed the composite to the EM console and upon invocation my changes are not getting reflected. How do I know the files I modified are deployed to em console are correct.
Answer : Here is how you access composite.xml /.bpel and .xsl files from your browser to ensure that the deployment is having correct files.
http://hostname:managedserverportnumber/soa-infra/services/partitionname/compositename/composite.xml
http://hostname:managedserverportnumber/soa-infra/services/partitionname/compositename/bpelfilename.bpel
http://hostname:managedserverportnumber/soa-infra/services/partitionname/compositename/xsl/xslfilename.xsl
This also comes in handy when you have configuration plan attached to the composite at the time of the deployment which over-rides composite.xml
Question : How to update the DVM values from browser?
Answer : Access http://hostname:managedserverportnumber/soa/composer
Login using the authentication details and then Click open –> open dvm from the tab and it will list all DVMs part of the MDS. You can click on individual DVM and add or update the values.
Question : How to use Database Based MDS in SOA 11g based application?
Answer : Please refer to the article http://www.orafmwschool.com/ant-scripts-for-database-based-mds/ this article describes how to use ant scripts for deploying the MDS Artifacts to the DB Based MDS.
Question : How to clear MDS Cache?
Answer : Please login to the em console and then follow the screen shot below to reach clearCache link. Click on clear cache and then click invoke it will clear the MDS Cache.
Please click on the image below to view the full screen.
Clear MDS Cache

Clear MDS Cache
Question : How take export of the MDS Artifcats from EM Console?
Answer : Please login to the EM console and follow the steps in the screen shot.
Please click on the image below to view the full screen.
Export MDS
Export MDS
Question : How do I deploy / undeploy composite using ant scripts?
Answer : You will find all the ant scripts responsible for carrying out various task for deployment / undeployment and unit testing of composites under $SOA_HOME/bin directory.
example /Middleware/Oracle_SOA1/bin. Please go thru these files and write your own wrapper to invoke tasks part of these ant scripts to have your own deployment scripts.
Question : I am unable to Install Oracle XE 11g and getting following error OracleServiceXE found on system. How do I overcome this?
Answer : Go to command prompt and type following
sc delete OracleServiceXE
Even if you are logged in as an administrator or user with administrative privileges  it is recommended to go to Accessories –> command prompt –>right click–>Run As Administrator.
This will remove the service and you can proceed with installation.
For more details please refer to the blog here
Question : Where can I find information on SOA 11g Performance Tuning?

Here is a link of very nice blog that I found very informative.
http://blog.ipnweb.com/2011/04/performance-tuning-oracle-soa-suite-11g.html

Oracle SOA 11g Installation Pitfalls

In my earlier post I have recommended using install instructions which are part of the Quick Install Guide available at http://www.oracle.com/technetwork/middleware/soasuite/overview/quickstartguidesoasuite11gr1ps4-459545.pdf
However after trying installation myself on a new PC I realized that there are few issues that we encounter and we need to take few corrective actions which are not mentioned in this guide and these are applicable only when you are using Oracle XE as a database. I am writing this post to help newbees avoid the issues and have a smooth installation.
Page no 12 of the Quick Install Guide has an important note and asks us to set an environment variable as follows.
set RCU_JDBC_TRIM_BLOCKS=TRUE
echo %RCU_JDBC_TRIM_BLOCKS%
Initially when I tried installation the SOA server failed at startup ( Please refer to the link https://forums.oracle.com/forums/thread.jspa?threadID=2292686 ) after following various instrcutions I concluded that we need to perform following steps.
Before using RCU Utility
Go to the command prompt
c:\>sqlplus [XE Username/ Password] @ XE as sysdba
for example in my case it was
c:>sqlplus sys/welcome1@XE as sysdba
SQL> show parameter session
SQL> show parameter processes
SQL> alter system reset sessions scope=spfile sid=’*';
SQL> alter system set processes=500 scope=spfile;
SQL>grant execute on dbms_lob to public;
SQL> shutdown immediate
SQL> startup
SQL> show parameter session
SQL> show parameter processes
(In my case after shutting the DB down it did not come up by giving the command mentioned above so I have to explicity re-start the database).
GO to command prompt and then to the  directory where RCU is extracted.
set RCU_JDBC_TRIM_BLOCKS environment variable.
set RCU_JDBC_TRIM_BLOCKS=TRUE
echo %RCU_JDBC_TRIM_BLOCKS% this should return TRUE.
Now login to the XE databse ( http://127.0.0.1:8080/apex ) use SYS or SYSDBA or any user with administrative previleges.
Execute following query.
grant execute on dbms_lob to public
This sql statement is what I think made the difference as just setting the environment variables mentioned above (set RCU_JDBC_TRIM_BLOCKS=TRUE) did not help.
I would suggest re-starting the XE database again and continue with using RCU for creating MDS and soa-infra schema etc.
I found following links useful.
http://www.javamonamour.org/2011/01/package-body-devmdsmdsinternalshredded.html
http://www.yonaweb.be/start_webcenter_domain
I have written this post to provide all that it takes to fix this issue and hope this helps in preventing the conflict which we are predicting will prevent the soa server to get started after installation.

How To Learn Oracle SOA Suite 11g

After spending around 30 months and almost as many attempts to get hold of Oracle Fusion Middleware 11g I think now I know how not to learn this technology stack and hence writing this post to help beginners and stragglers like myself to learn more in less time.There is documentation overdose when it comes to SOA 11g that causes a humble and earnest beginner to get drowned in the vast sea of information freely available.
Prerequisites :
  • Through understanding of XML / XML Schema ( XSD ) / XSL / XML namespaces.
  • Web Services ( wsdl structure ) / SOAP messages.
  •  Java Database Connectivity ( JDBC ) / Java Messaging Service ( JMS ) / Java Connection Architecture ( nice to have ).
  • Familiarity with JavaEE Application Server ( preferably Weblogic)
  • Familiarity with Apache Ant scripting ( Python is nice to have as Weblogic Scripting Technology WLST is based on Python).
  • A Laptop or PC with around 3 GB RAM preferred configuration is 64 it OS with 4GB + RAM.
Please don’t attempt learning SOA 11g if you don’t know enough of XML and related technologies mentioned in the very first point above. Once you have acquired prerequisite skills then follow the steps mentioned below.
Steps : 
  1. Install latest version of JDeveloper and other relevant software. Please refer to the link for downloading software and documentation.http://www.oracle.com/technetwork/middleware/fusion-middleware/overview/index.html.
  2. If you are doing this for the first time then you will need installation instructions. Oracle has published updated installation instructions which are available at following url http://www.oracle.com/technetwork/middleware/soasuite/overview/quickstartguidesoasuite11gr1ps4-459545.pdf (11.1.1.5.0 )
  3. Each installation of JDeveloper comes with bunch of very useful documentation which are often ignored and a lot of time is wasted in searching for the information on the web when it is already available just a click away in your own JDeveloper.
  4. To access this documentation Open JDeveloper –> Help –> Table Of Contents –> Developing SOA Applications. You will find Developer’s Guide to Oracle SOA Suite; this guide belongs to the version of JDeveloper that you have installed.
  5. There is a book tailor made for beginners Getting Started with Oracle SOA Suite 11g R1 – A Hands-On Tutorial by  Heidi Buelow,Manas Deb,Jayaram Kasi,Demed L’Her,Prasen Palvankar printed by PACKT publishing ( ISBN 978-1-847199-78-2). You should be able to download the free source code from the book website www.packtpub.com. This book is having screen shots for earlier version of SOA suite so don’t get confused but the content is still relevant.
  6. There are plethora of blogs / tutorials dedicated to teach SOA Suite 11g but the trick is to only concentrate on relevant topics to pick up the jargon and technology fast and not to get distracted with information overdose. If you want to still explore then go to the link http://www.orafmwschool.com/  which has lot of short tutorials and whole lot of other information to get you going.
  7. Here is the index page for Getting Started for Oracle Fusion Middleware Technology stack which will help in getting started with the stack of your choice http://download.oracle.com/docs/cd/E21764_01/getstarted.htm
  8. Good blog by Oracle recommending the approach to learn SOA 11g available here https://blogs.oracle.com/SOA/entry/how_to_get_trained_on
  9. If you are one of those who prefer to learn by samples rather than going thru the books or documentation then http://java.net/projects/oraclesoasuite11g/pages/Home
  10. Once you are comfortable with the basics then have a deep dive and explore Oracle Fusion Order Demo provided by Oracle.Here is a very good blog by Antony Reynolds to download / install and run Fusion Order Demo for PS5. Here is the link for detailed documentation http://docs.oracle.com/cd/E12839_01/integration.1111/e10223/index.htm
  11. Here is collection of very good articles by Oracle on SOA in general http://www.oracle.com/technetwork/topics/soa/whatsnew/index.html
As this is a post to help beginners save on time and effort hence providing lot of document links in this blog will defeat the whole purpose of writing this. It will take at least 120 hours to finish reading the Developer’s guide and around 100 hours to finish the book that I have recommended with all the examples and I am sure by that time you would get familiar with the tools and jargon. And by that time I want to come up with another post that will try to explain a bit of theory and rationale behind all this. I sincerely hope this helps you.

4 comments:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle JDeveloper 11g Fusion, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Oracle JDeveloper 11g Fusion. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/



    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Oracle 11g Fusion Java Programming, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Oracle 11g Fusion Java Programming. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/



    ReplyDelete

xslt padding with characters call template for left pad and right pad

  Could a call-template be written that took two parameters ?   a string, and a   number) return the string with empty spaces appended t...