If it happened to deploy ADF application on WebLogic, most likely you noticed that it assigns default version V2.0 for each ADF deployment. We would like to set our own specific version, instead of having V2.0 assigned by default:
This can be achieved by creating Manifest file inside root src/META-INF folder:
You must create Manifest file by yourself and it should be visible under META-INF descriptors from JDeveloper:
ADF application version is specified by Weblogic-Application-Version parameter inside Manifest file:
Register Manifest file with application deployment profile - include Manifest under EAR options:
Make sure to remove Manifest file from Application Descriptor filters - otherwise file will be included twice and deployment fail:
Application with our predefined version is deployed. Previos version is not removed, but is retired - we can remove it later or restore if needed:
Download sample application, it includes sample Manifest file - ADFVersionApp.zip.
This can be achieved by creating Manifest file inside root src/META-INF folder:
You must create Manifest file by yourself and it should be visible under META-INF descriptors from JDeveloper:
ADF application version is specified by Weblogic-Application-Version parameter inside Manifest file:
Register Manifest file with application deployment profile - include Manifest under EAR options:
Make sure to remove Manifest file from Application Descriptor filters - otherwise file will be included twice and deployment fail:
Application with our predefined version is deployed. Previos version is not removed, but is retired - we can remove it later or restore if needed:
Download sample application, it includes sample Manifest file - ADFVersionApp.zip.







16 comments:
if there are multiple version running on weblogic then user request will be serviced by which deployment. I have seen issue ,if multiple version are deployed with different context then too it will show GUI of version 1 instead of version 2 on different context.
There must be always one version running at one time, other versions should be retired - as per screenshot...
Regards,
Andrejus
Hi,
I do it all with ANT like this ( this is a war , but I also do it with a shared lib ,ejb, ear etc )
<war destfile="${workspace.dir}/deploy/${deployment.name}.war" needxmlfile="false">
<lib dir="${workspace.dir}/deploy">
<include name="*.jar"/>
</lib>
<manifest>
<attribute name="Extension-Name" value="${deployment.name}" />
<attribute name="Specification-Version" value="${version.number}" />
<attribute name="Implementation-Title" value="${deployment.name}"/>
<attribute name="Implementation-Version" value="${version.number}-b${build.number}" />
<attribute name="Implementation-Vendor" value="Enbridge" />
<attribute name="Weblogic-Application-Version" value="${version.number}-b${build.number}"/>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Built-Date" value="${build.date}" />
</manifest>
</war>
thanks
Thanks for sample script.
Andrejus
Hasim,
both version run in parallel while there are session still valid.
Users already connected to old version will continue to use it as long as their session is valid.
New users will use the new version of the application.
Once all sessions on old version are no more, the old application will be retired.
Hi,
I tested - app version goes to Retired state, even there is active user session. At least with default settings. Any specific configuration should be set?
Andrejus
This is the default behavior that while there are some active sessions the old application will have an intermediate 'stop running' status, so if your application was put to Retired all sessions must have been closed.
That's what i observe on all my applications
For my test case, I had couple of opened sessions. Most likely it just kills sessions attached with old application and sets Retired state.
Andrejus
ok, i understand why.
If you update the deployed application from the weblogic console at some point during deployment you have the choice between allowing the app. to finish the current sessions (it's the default behavior) or retire after a timeout (by default 1 in the console).
Jdev is probably using the later option.
I see, thats explains it.
I tested this in JDeveloper 11.1.1.3 and I needed another bogus line in the MANIFEST.MF file for it to work properly. Otherwise the file is simply ignored and the version stays 2.0. Has anyone else noticed this?
Please mention what line you needed?
Andrejus
Great concise post - thankyou Andrejus
Wendy mentioned:
"I needed another bogus line in the MANIFEST.MF file for it to work properly"
It is important that the last line in MANIFEST.MF be terminated properly with 0x0D 0x0A ( like all previous lines ) else it will be ignored.
Interestin - I didnt faced that. Thanks for update.
Andrejus
Then is there a way to programmatically (in java) obtain the version number of this EAR?
Post a Comment