Accessing global custom attributes in WebCenter Portal 12c

Global Attributes can be declared to share variables and information between all the Portals.

Out of the box, one of the attributes is the wcSessionTimeoutPeriod responsible for the session timeout. My friend Daniel already blogged about
accessing this on his blog entry.http://blog.vassit.co.uk/knowledge/access-global-custom-attributes

Way of accessing in EL is still working as following

HOW CAN BE ACCESSED USING EL EXPRESSIONS?

#{WCAppContext.application.applicationConfig.customAttributes[‘wcSessionTimeoutPeriod’]}

If you want to use Java API, one way to use

ADFUtils.evaluateEL("#{WCAppContext.application.applicationConfig.customAttributes['wcSessionTimeoutPeriod']}")

But if you are concern about performance, it’s not best practices to use evaluate EL in the java class. It is better to use OOTB API to access this. in 12c you can use following way

WCApplicationContext wcAppCtx = WCApplicationContext.getCurrentInstance();
WCApplication wcApp = wcAppCtx.getApplication();
WebCenterType wcMeta = wcApp.getApplicationConfig();
CustomAttributes customAttr = wcMeta.getCustomAttributes();
...

This will work in 12c.

Happy learning

Performance tuning of Jdeveloper 12c

Very frequent we get issues of JDeveloper hangs.Then you need to close JDeveloper and restart. if you are developing and debugging, this problem occurs more frequently.This post tell how to make your jdeveloper with better performance.

Jdeveloper –

1) Go to MW_HOME \jdeveloper\ide\bin\ide.conf and increase the Max heap size (Xmx).

//Set this option depend on your system configuration.I have 16gb ram, I prefer to set this.
AddVMOption -Xms2048M
AddVMOption -Xmx4096M

2) Go to MW_HOME \jdeveloper\jdev\bin\jdev.conf and set the following parameters

// Increase your MaxPermSize
AddVMOption -XX:MaxPermSize=1024M

//Adds a memory monitor which helps in check current heap used by jdeveloper

AddVMOption -DMainWindow.MemoryMonitorOn=true

//ADD the following JVM options towards the end of file
AddVMOption -XX:+UseStringCache
AddVMOption -XX:+OptimizeStringConcat
AddVMOption -XX:+UseCompressedStrings
AddVMOption -XX:+UseCompressedOops
AddVMOption -XX:+AggressiveOpts
AddVMOption -XX:+UseConcMarkSweepGC
AddVMOption -DVFS_ENABLE=true
AddVMOption -Dsun.java2d.ddoffscreen=false
AddVMOption -XX:+UseParNewGC
AddVMOption -XX:+CMSIncrementalMode
AddVMOption -XX:+CMSIncrementalPacing
AddVMOption -XX:CMSIncrementalDutyCycleMin=0
AddVMOption -XX:CMSIncrementalDutyCycle=10

ttt

3 ) Disable the SVN versioning system that is built into JDeveloper.Uncheck the checkbox for Subversion for example support for GIT

4) Reduce ON-Save and AFTER-Save Actions
Go To Tools >> Preferences >> Code Editor >> Save Actions
Remove “Build After Save”

1

2

After that, Please restart jdeveloper.Your jdeveloper will give better performance