SOA 11g provides a configuration plan file for composite deployment. A common use is to search and replace hosts and ports depends on the platform (dev, test, qa, prod) you are deploying to. The question is when do those search / replacement take place?
If you wonder why do I ask this seemingly obscured question, let's take another look at it.
Suppose you do development on server "soaDEV.mybusiness.com", and SOA runs on port 8001. Then you need to migrate your work to "soaPRD.mybusiness.com", and SOA runs on port 80 over there.
So your plan file may contain something like:
<search>soaDEV.mybusiness.com:8011</search>
<replace>soaPRD.mybusiness.com:80</replace>
When you click on "Deploy" and pick your configuration plan file, a common misconception is that "soaDEV.mybusiness.com:8001" will be magically replaced, and "soaDEV.mybusiness.com" is almost irrelevant. However, if you shut down "soaDEV" server, you will notice that JDEV will fail the compilation.
When you click "Deploy" in JDev, it's actually a two-step process. First Jdev generates the jar (sar) file. Then it uploads (deploys) the jar to the SOA server (you can actually do these two steps manually. First compile / generate the jar file. Then go to EM console to deploy the composite.)
The search / replacement only takes place during the 2nd stage. When SOA server receives the composite jar file, it does a second compilation using BPEL Compiler. So when JDEV compiles the BPEL source code, it still requires your original "soaDEV.mybusiness.com" to be up and running. It still needs to reference the WSDL from port 8001on "soaDEV".
Now we know the facts, I still have this question that bugs me all the time. Why can't (won't) JDEV do search and replacement before the compilation? I don't truly know the answer. I'm sure there is a fundamental answer to this question.
I always have this eerie feeling that 9 months after you have finished your production deployment, you still need to keep your soaDEV server running in order to support your soaPRD environment. Because Jdev needs to reference soaDEV in order to compile. What about the potential inconsistency between soaDEV and soaPRD 9 months after or even longer?
Showing posts with label Deployment Plan. Show all posts
Showing posts with label Deployment Plan. Show all posts
Sunday, August 26, 2012
Saturday, October 15, 2011
Deployment Plan File not Taking Effect?
I suppose there can be many reasons that the deployment file plan does not work properly.
I ran into a perticular situtation where my deployment plan file won't take effect, so all my replacement strings have no effect. It baffled me for a long time. I accidentally figured out the reason today.
In my particular case, I have an AIA EBS process, which uses mediator to route services. So there is no XSD and no WSDL for the project. So the generated plan file has this section at the bottom:
<wsdlAndSchema name="">
<searchReplace>
<search/>
<replace/>
</searchReplace>
</wsdlAndSchema>
I think the empty "name" attribute renders the plan file invalid, therefore it won't take effect. I simply changed it to
<wsdlAndSchema name="NONE">
that did the trick for me. With that change, my plan file worked without problem.
I ran into a perticular situtation where my deployment plan file won't take effect, so all my replacement strings have no effect. It baffled me for a long time. I accidentally figured out the reason today.
In my particular case, I have an AIA EBS process, which uses mediator to route services. So there is no XSD and no WSDL for the project. So the generated plan file has this section at the bottom:
<wsdlAndSchema name="">
<searchReplace>
<search/>
<replace/>
</searchReplace>
</wsdlAndSchema>
I think the empty "name" attribute renders the plan file invalid, therefore it won't take effect. I simply changed it to
<wsdlAndSchema name="NONE">
that did the trick for me. With that change, my plan file worked without problem.
Subscribe to:
Posts (Atom)