10 Replies Latest reply on Dec 1, 2010 1:04 PM by Eric Elzinga

    OSB and Continious Integration (CI)

      We put our OSB projects in SVN for version control. What I would like to do sounds simple and is very common within the Java Community. We would like to use a test OSB server to be automatically propagated with certain OSB projects from a version control system (svn) and execute a number of automatic tests on it (SoapUI or SOAPUnit or whatever...). For that we need the following automated tasks (ANT or whatever).

      1. Checkout (Welogic Workshop) OSB projects
      2. Create sbconfig.jar
      3. Import sbconfig.jar into OSB Test Server
      4. Run tests

      3. and 4. are not very complicated. There are a lot of samples with import.py scripts. 1. is not so complicated either, just doing a svn checkout on certain projects.

      2. Seems to be more complicated. If I read correctly there are no scripts to create a sbconfig.jar out of weblogic/Eclipse workshop OSB projects in a workspace. You can only create a sbconfig.jar by exporting it from a running server instance. This is somewhat disappointing. So how should we proceed?

      A somewhat complicate approach would be:

      1. Start a deployment server instance of the CI server
      2. Check out projects in local workspace on CI Server
      3. Automatically publish them on deployment server (somehow triggering certain Weblogic Workshop/Eclipse classes ?!?)
      4. Do an export sbconfig.jar on deployment server
      5. --> 3. above and on


      Or another approach would be:

      Create a script by hand building the sbconfig.jar. This would result in a lot of work and be very specific to our situation. Use this script. HAS ANYONE DONE SUCH A THING...

      To make things even more complicated we are using the JCA DB Adapter. I also read there was some trouble with automated deployments when you are using JCA adapters.

      So the only answers I am looking for if it is possible to do fully automated deployments (including creating of sbconfig.jars from a code repository) for continuous integration. I cannot belief we are the only ones trying to pursue this. Please help us and give us some hints and guidelines (preferably with sample scripts) to help us achieve our goal...

        • 1. Re: OSB and Continious Integration (CI)
          As far as I know there is ant support in osb, so you can build your sbconfig.jar without workshop.

          Support for generating config.jar from command line or ant task
          1 person found this helpful
          • 2. Re: OSB and Continious Integration (CI)
            Hi there,
            we had/have same problem but only work around we have with current version i.e. 10.0 is to export config project from a development server.

            10gR3 appears to have the solution by creating config jar from .metadata folder. Now i wonder if this creative idea is going to help real problems, as in most projects more there are typically more then one develer, so how to merge or which .metadata folder to put in the repository to create config jar? some one should correct me here???

            I am not sure if thats any helpful but surely help you decide which approach you will follow. I would be more than happy to hear what approach you picked up for this issue as we have similar environment here.

            many thanks
            • 3. Re: OSB and Continious Integration (CI)
              From the documentation as was pointed out to me (RTFM :-) you can actually build a sbconfig.jar file based on a Configuration Project. So I agree with you on a new challenge, "how to organize your Configuration Projects for automatic building". We will be looking into that as and any suggestions from more experienced people are welcome.

              Looking at some statements concerning Configuration Projects (Copyright: Jeff Davies et al. )

              An OSB Configuration Project is also used to create and contain resources for SMTP, UDDI, and so on that can be accessed by all projects in the configuration project. It represents the configuration information associated with an OSB Domain (a group of servers, all similarly configured and providing identical functionality). It is also an umbrella project that will contain all of the other OSB projects you wish to deploy onto a specific OSB Domain.

              So depending on the number of OSB Domains you have you can have multiple Configuration Projects. You mentioned something about different workspaces for different developers perhaps getting you into trouble. I think I am going to use the following approach. For my deployments I will be needing Configuration Projects. So at least these are going to be created and checkin. Of course my OSB projects will be checked in. For the developers they can create their own local Configuration Projects as long as they are not checked in. Everybody is developing locally.

              I hope I can have more than one Configuration Project per Domain. When I do a sequential export of multiple sbconfig.jar files from different configuration projects I hope every new export does not completely erase the former one. So they are added and only resources are overwritten which are identical.

              Perhaps there are some best pratices on how to do this in a controlled way

              • 4. Re: OSB and Continious Integration (CI)
                Hi Frank,

                thanks for sharing you experience!

                • 5. Re: OSB and Continious Integration (CI)
                  Hi Frank,

                  We fully automated the nightly build and deployment, and it's possible using the ant script you've mentioned.
                  Currently I'm checking out the OSB projects from subversion, and building the sbconfig.jar using ant, which uses workshop in the background.

                  Regarding the OSBConfiguration file, I'm generating it on the fly, as you said you might want to have different projects being imported and sorting out dependencies across different phases of your project.

                  Once you export the project, you might have issues with the System project, as the Export file will add some entries with "deletes", so make sure that you don't import the System project to OSB, OR apply a patch (released last month by Oracle) to fix the issue.

                  There is another patch to enable you to export subprojects. So let's say you have 10 projects in your repository, you might want to group specific projects per JAR. I was planning initially to export one JAR per project, so it would be easier to distribute the JARs and deploy them in the production environment, however each time you invoke ANT it starts Workshop in the background and it takes a long time. So I decided to group the projects in 4 jars only.

                  Regarding the JCA DB Adapter, currently it's not possible to export a project which uses the JCA DB Adapter due to a bug in the ConfigExport. I already raised this issue with Oracle about 4 months ago, but didn't get the patch yet. If you raise this issue with the support it might help us to get a patch sooner.

                  Fabio Douek

                  Edited by: fabio@douek.com.br on Mar 17, 2010 6:26 PM
                  • 6. Re: OSB and Continious Integration (CI)

                    I am have same problem,we are the team working on one project...and everybody checkin their final copy to svn..
                    Now i want to checkout the proxy service ,business services ....n all and deploy on a single server.
                    Do anyone have the script to do this?
                    I have no idea how will i create sbconfig.jar just from the artiifacts...
                    plzz help

                    • 7. Re: OSB and Continious Integration (CI)
                      Hy Frank,

                      I also automated the OSB export with ant scripts. I works when i run the ant scripts in my OSB workshop.

                      But when you want the build to be automated with Continuous Integration, I would have to install the full OSB workshop on my build environment?
                      That is not exaclty what I want. I would expect from Oracle that they provide a fully self-contained ant-task which could be used on the build envrionment.

                      How have you solved this problem?

                      • 8. Re: OSB and Continious Integration (CI)
                        Eric Elzinga
                        Oracle supplies ant scripts for the export/creation of the sbconfig.jar from a running osb server or from a eclipse workspace project.
                        both work well and will create the sbconfig.jar for you

                        for the export from the eclipse workspace you indeed need some eclipse jars to do the export.

                        currently we use scripts to do the svn checkout and export the jar from these resource and deploy it to a server, works ok
                        • 9. Re: OSB and Continious Integration (CI)
                          Hi Eric,
                          We are in a Similar situation in our project. Can you send me the ABT Script which you are using? I can take it as a reference and Build my own.

                          Thanks for your help.
                          • 10. Re: OSB and Continious Integration (CI)
                            Eric Elzinga
                            see :

                            WLST scripts to import/export and customize OSB configuration jar


                            with those scripts you should be able to do your thing,we used them too in our framework