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

Faster login in Enterprise manager for WebCenter Portal using discovery cache

Sometime logging into EM takes a lot time, which is quite frustrated. We can enable the discovery cache to make it faster.

Click on your domain and System Mbean Browser.

Access following AdminServer mBean for setting the cache property.

  • emoms.props:Location=AdminServer,name=emoms.properties,type=Properties,Application=em

Click on emoms.properties and set Property

Enter key as “oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS “and value as “true”. Please set three properties as following and click invoke

Setting rest(last) two properties as above.  Unless using non-default values, the last two properties are optional.

# Enable caching of FMw Discovery data and use it for other subsequent users.
# Values=true/false   Default=false
oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_USE_CACHED_RESULTS=true

# If caching of discovery data is true, this parameter indicates how long the discovery data
# from cache should be used before requiring a fresh discovery.
# Time value is in milliseconds.  Default is 7200000 milliseconds.
oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_CACHE_AGE=7200000

# If caching of discovery data is true, a user logs in and a discovery session is in progress,
# this parameter indicates how long the user can wait for current discovery to complete.
# After this wait time is elapsed and discovery is still not finished:  If there is already data
# in cache it will be used, else the user will launch a new discovery session.
# Time value is in milliseconds.  Default is 10000 milliseconds.
oracle.sysman.emas.discovery.wls.FMW_DISCOVERY_MAX_WAIT_TIME=10000

 

 

After target is set and refresh farm and that’s it

 

 

Enjoy fast login in EM

WCSDocs error in webcenter Portal

Hi All,

In webcenter portal, if you seeing this error in the log as below

java.io.FileNotFoundException: Response: ‘401: Unauthorized’ for url: ‘http://host:port/wcsdocs/_vti_bin/lists.asmx?WSDL’

at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:544)
at weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConnection.java:37)
at oracle.j2ee.ws.mgmt.server.mbean.WebServicePort.getFileStreamFromHttpConnection(WebServicePort.java:2204)
at oracle.j2ee.ws.mgmt.server.mbean.WebServicePort.parseWsdl(WebServicePort.java:2144)
at oracle.j2ee.ws.mgmt.server.mbean.WebServicePort.getSoapBinding(WebServicePort.java:2217)
at oracle.j2ee.ws.mgmt.server.mbean.WebServicePort.extractTransportFromWsdl(WebServicePort.java:1910)
at oracle.j2ee.ws.mgmt.server.mbean.WebServicePort.getTransport(WebServicePort.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

This is really annoying. You can fix by adding a startup parameters as

-Dwebcenter.spaces.disableAutoConfigure = True

This will fix this error.

Happy learning