Monday, March 4, 2013

OSB: project level vs resource level export

in a sbconfig.jar, ExportInfo contains a metadata section "imp:properties xmlns:imp="http://www.bea.com/wli/config/importexport" containing "projectLevelExport" (true/false).

This value affects the way a project is imported with ALSBConfigurationMBean.importUploaded: http://docs.oracle.com/cd/E17904_01/apirefs.1111/e15033/com/bea/wli/sb/management/importexport/ALSBImportPlan.html,

If the config jar file was exported at the resource level: if the resource is not in the jar file but in the domain: Skip (No-op)

if the config jar file was exported at the project level (this behavior affects only the resources in the projects that are found in the jar file.) if the resource is not in the jar file but in the domain: Delete


There is even a method to test this value http://docs.oracle.com/cd/E17904_01/apirefs.1111/e15033/com/bea/wli/sb/management/importexport/ALSBJarInfo.html#isProjectLevelExport__

There is no way to set it. So you MUST generate the sbconfig.jar with already the projectLevelExport set to true.

The command by which we export the resources (project) is:

java -Xms384m -Xmx768m -XX:MaxPermSize=256M -Dosgi.bundlefile.limit=1000 -Dosgi.nl=en_US -Dosb.home=${osb_home} -Dweblogic.home=${weblogic_home} -Dharvester.home=${harvester_home} -Dsun.lang.ClassLoader.allowArraySyntax=true -jar ${eclipse_home}/plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar -data ${bamboo_builddir} -application com.bea.alsb.core.ConfigExport -configProject ${configProject} -configJar ${tempdir}sbconfig.jar -configSubProjects "${PROJECT}" -includeDependencies true 2> ${errorlog}

http://docs.oracle.com/cd/E21764_01/doc.1111/e15866/tasks.htm#i1130159

I really have no clue on how to control the value of that parameter. All I see is that by manually changing it from

imp:property name="projectLevelExport" value="false"

to

imp:property name="projectLevelExport" value="true"

in the ExportInfo, the way the project is imported changes accordingly.

No comments: