Friday May 08, 2015

ADF Faces 12c Components Demo and Test Automation by Wilfred van der Deijl

clip_image002You might have noticed that I am working on a series of blog articles on using Selenium to automate testing of Oracle ADF applications. This includes work on a little framework to make this easier and a set of sample JUnit tests against the public Oracle ADF Faces 12c Components Demo.
Getting the Faces 12c Component Demo running with test automation had some challenges. I wanted to write them down here in case somebody wants to try the same. It starts by downloading the Oracle ADF Faces Components Demo from OTN. This also includes instructions on how to run this application in your integrated weblogic server, but those instructions have some caveats and are for JDeveloper 11g, not version 12c. Please follow the instructions below as an alternative (I've marked the differences with the normal Oracle instructions and included screenshots at the end).
In the end this needed more work than I expected, so I offer the fixed version for download. If anyone from Oracle feels that this is a problem please contact me and I'll remove the download and you can follow the instructions below to create your own fixed version.

Download the ADF Faces 12c Components Demo WAR file, but don't unpack it.

Start JDeveloper 12.1.3

Instructions updated from 11g: Choose File > From Gallery from the menu to create a new application. Select General > Applications in the tree and select Custom Application as application type and press Ok.

In the Create Application dialog type adffacesdemo as the application name, select a directory, leave the rest of the options alone and press Finish. This creates new application workspace and project.

Instructions updated from 11g: The default created project is not needed and you may delete the project. Right click it and select Delete Project. In the subsequent dialog choose to not only delete the project form the application but also delete it from disk.

Instructions updated from 11g: In the now empty workspace choose File > From Gallery from the JDeveloper menu. In the list of items select Projects and on the right hand side Project from WAR and press Ok. In the next dialog provide a name for the project, e.g. adffacesdemo, and keep the directory information. On the second panel, use the file browser to select the downloaded ADF Faces demo WAR file and finish the wizard.

Double click onto the project node to open the project properties and select the Run > Debug > Profile option. Press the Edit button and select the Tool Settings. In the Before Running section, uncheck the Make Project and Dependencies option and close the dialog pressing Ok. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Friday May 01, 2015

Securing passwords in Coherence override files by Peter van Nes

clip_image002In a previous post i wrote how to Secure Coherence communications for FMW SOA by enabling SSL through a Coherence override file. Setting up SSL involves setting up a keystore and truststore which are protected by a passsword. To access the key- and truststores Coherence retrieves the required passwords from the elements in the Coherence override files. Currently Coherence does not support encryption of these password element values. A possible solution to prevent clear-text keystore passwords in the Coherence override files is to use a System Property override for these password elements.

You can override element values in the Coherence override file using the attribute system-property. The value assigned to this attribute is the System Property containing the value overriding the element value in de Coherence override file. Let’s make it more clear using a snippet from a Coherence override file below. The default private keystore password at line 8 is intentionally left empty and the attribute system-property is added to the password element. The value assigned to the attribute system-property, coh.override.keyst.pwd, is the name of the System Property which is used to override the value in the password element.

So now we can set the value for the private keystore password using the System Property ‘coh.override.keyst.pwd’. You could set this system property for example by adding the next two lines to the setDomainEnv.sh.

But really, this is not a great improvement, the clear-text password has moved from one file to another! Also the password now can be retrieved by anyone who has access to the system by displaying the active processes. What we have learned from here is that the use of System Properties allows us override the value for the password elements in the Coherence override file. If there is a possibility to read the keystore password values from an encrypted file and set the corresponding system properties when starting a Managed Server the it would improve the protection of the keystore passwords.

And yes, it is possible. For those who are not interested in the nitty gritty details but just want to store the keystore passwords in the Coherence Override file in a secure manner here the concise installation instructions first.

Download the Weblogic Startup classes in CoherenceKeystorePasswordCipher.jar here.
Copy this jar into the lib folder of your domain_home and add the jar file to the classpath.
This can be done, for example, by adding the next line to the setDomainEnv.sh
POST_CLASSPATH="${DOMAIN_HOME}/lib/CoherenceKeystorePasswordCipher.jar${CLASSPATHSEP}${POST_CLASSPATH}"

Edit the Coherence override file and change all elements for which you want to secure the password.

Remove the value (password) from the password element.

Add the attribute system-property to the password element and assign a descriptive and unique system property name

For example, change Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Sunday Apr 05, 2015

Securing Coherence unicast communications for FMW SOA by Peter van Nes

clip_image002When confidentiality is required for an Oracle Fusion Middleware environment, the first thing you probably will do is configure SSL for the domain. You might think that this will secure all your connections in the domain, but various FMW applications utilize different frameworks like JGroups or Oracle Coherence which connections are not secured by configuring SSL for the domain.

Various FMW applications, like Oracle Identity Manager, use FMW SOA which utilizes Oracle Coherence for Unicast communications. As Oracle recommends Unicast communication for SOA enterprise deployments in the Fusion Middleware Enterprise Deployment Guide for Oracle SOA Suite, you probably will have setup Unicast communication in your production environments accordingly by adding the Java properties tangosol.coherence.wka[1-n] and tangosol.coherence.localhost.

Instead of adding the properties to the Server Start arguments for each server individually you could add these settings to the setDomainEnv.sh. This way you have consolidated view of all the configuration settings for the Coherence cluster. Securing Unicast communications

Unicast (TCMP) communications for Coherence can be secured using by defining a SSL Socket Provider.  [Coherence Security Guide; Using SSL to Secure TCMP Communication]

A pre-defined SSL Socket Provider ‘ssl’ is defined in the tangosol-coherence.xml file of java archive coherence.jar which can be found in the lib directory of your coherence installation in the <MW_HOME>. The pre-defined SSL Socket Provider expects a key- and truststore with the name keystore.jks which must be present in the classpath. Therefore this Socket Provider is less suitable for production environments where truststores and keystores are defined in separate Keystores. Best practice is not to replace tangosol-coherence.xml, but to override the operational and run-time settings using  an Operational Override File. The property tangosol.coherence.override specifies the name of the override file to be used instead of the default. In this override file the cluster-config element should be defined to enable SSL for TCMP (Unicast). The cluster-config element contains three sub-elements; member-identity, unicast-listener and socket-provider.

The member-identity element contains the cluster-name of the Coherence cluster. This is the same name as the cluster name set in property tangosol.coherence.cluster when configuring unicast communications. Element unicast-listener defines the well- known-addresses, listen-ports and other properties of all cluster nodes. This are the values you assigned to the properties tangosol.coherence.wka[1-n] and tangosol.coherence.localhost when setting up unicast communications. The element socket-provider should have the same value as attribute id of the socket-provider element which will be described next. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Thursday Apr 02, 2015

Coherence, WebLogic and Java SE 8 by René van Wijk

clip_image002

In this post we will explore some new Java SE 8 features,

  • Lambda Expressions enable us to treat functionality as a method argument, or code as data. Lambda expressions let us express instances of single-method interfaces (referred to as functional interfaces) more compactly. The Java SE 8 API also ships a lot of new functional interfaces to make our life easier.
  • Method references provide easy-to-read lambda expressions for methods that already have a name.
  • Default methods enable new functionality to be added to the interfaces of libraries and ensure binary compatibility with code written for older versions of those interfaces.
  • Classes in the new java.util.stream package provide a Stream API to support functional-style operations on streams of elements. The Stream API is integrated into the Collections API, which enables bulk operations on collections, such as sequential or parallel map-reduce transformations.

and see how these work out on WebLogic and Coherence. Note that WebLogic 12.1.3 and Coherence 12.1.3 are supported on Java SE 8, with the following restrictions:

  • WebLogic Server 12.1.3 does not support applications using the Java SE 8 fork/join and parallel streams features. Avoid these features when building WebLogic Server 12.1.3 applications using Java SE 8. The reason for this restriction is that the threads used by the fork/join thread pool will not be WebLogic Server managed threads. Any of the work performed in these threads may not be able to make use of WebLogic Server or Java EE facilities because the state of these threads, including security and transaction state, may not be created properly. Further, these threads will not be controlled by WebLogic Server Work Manager thread management facilities, possibly resulting in excessive thread usage.
  • When using Java SE 8, the use of permgen-memory is no longer required. The Java command line options -XX:PermSize and -XX:MaxPermSize are ignored: Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0.
  • Java SE 8 has new APIs for JDBC 4.2 and is supported for WebLogic Server 12.1.3 running on Java SE 8 with a JDBC driver that supports JDBC 4.2. However, although the Oracle JDBC thin driver bundled with WebLogic Server is certified on Java SE 8, the Oracle JDBC thin driver does not support JDBC 4.2.
  • When running using SSL connections with JCE on JDK 8, it may be necessary to install the Java Cryptography Extension Unlimited Strength Jurisdiction Policy Files 8.

As an example, we will use the application presented in the post Coherence 12c Grid Archive. To include some Java SE 8 features, we rewrite the servlet as (in which we also use parallel streams, although not supported, but just out of curiosity to see what goes on in the Java runtime). Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday Feb 24, 2015

Full recovery of a corrupt WebLogic embedded LDAP server by Peter van Nes

clip_image002Today one of the Adminservers failed to re-start and was flooding the AdminServer.out with multiple EmbeddedLDAP java.lang.ArrayIndexOutOfBoundException messages per second. I do admit, this is not the first article about how to recover from this issue, and probably not the last. Although i was able to Google multiple articles and blogs on this exception, all of the suggested solutions left me with a seed embedded LDAP. The good news is that  by default a backup is made of the embedded LDAP every day at 23:05 and the last 7 copies are retained. You can find these setting by selecting the domain in the domainstructure of the Weblogic console and then open the tab Security > Embedded LDAP.

So you can recover fully from a corrupt Weblogic embedded LDAP server, just follow these few steps.

· Shutdown admin server

· Move the current data directory so you can access it later.
mv <domain_home>/servers/AdminServer/data to <domain_home>/servers/AdminServer/data.bkp

· Start the admin server Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Thursday Dec 04, 2014

Whole Server Migration by Rene van Wijk

clip_image002In a WebLogic Server cluster, most services are deployed homogeneously on all server instances in the cluster, enabling transparent fail-over from one server instance to another. In contrast, for 'pinned services' such as JMS and the JTA transaction recovery system are targeted at individual server instances within a cluster, WebLogic Server supports failure recovery with migration, as opposed to fail-over.
Migration in WebLogic Server is the process of moving a clustered WebLogic Server instance or a component running on a clustered server instance elsewhere in the event of failure. Upon failure, a migratable server is automatically restarted on the same machine, if possible. If the migratable server cannot be restarted on the machine where it failed, it is migrated to another machine. In addition, an administrator can manually initiate migration of a server instance.

Configure whole server migration

Before we configure whole server migration, we need to know the requirements:

  • The migratable server candidate machines have to be in the same subnet (because the virtual IP address must be valid on each candidate machine). Whole server migration uses a virtual IP address for each migratable server.
  • On each candidate machine, the Node Manager must be initialized such that it can accept commands from the Admin Server.
  • The Node Manager is used to migrate the virtual IP address and assign it to the target machine (i.e., invoke ${DOMAIN_HOME}/bin/server_migration/wlsifconfig.sh addif or invoke ${DOMAIN_HOME}/bin/server_migration/wlsifconfig.sh removeif). Note that the default configuration assumes that the machines are similar, i.e.,
    • The netmask associated with the virtual IP is the same on each candidate machine.
    • The network device (interface) name (for example, eth0 on Linux) is the same on each candidate machine.
    • The functional behavior of the platform-specific OS command used to add and remove the virtual IP (for example, ifconfig and arping on Linux) is the same.
  • Migratable servers cannot define any network channels that use a Listen Address different from the virtual IP address associated with the server. If servers must use multiple network channels associated with multiple IP addresses, whole server migration cannot be used as only migration of a single virtual IP address for each migratable server is supported.
  • Server-specific state must be shared through some highly available sharing mechanism, i.e., the default persistent stores where the XA transaction logs are kept must be accessible on each candidate machine.

As mentioned above the Node Manager invokes the script wlsifconfig.sh to run ifconfig and arping commands (more information on these commands can be found here), for example, Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Forum Wiki

Tuesday May 13, 2014

A Weblogic Admin Console with a dynamic look and feel by Peter van Nes

In my previous post i explained how to build your a custom look and feel for the Weblogic Administration Console, which is a result of research into a possibility to distinguish Weblogic Consoles in DTAP environments. My initial plan was to develop a separate look and feel for each specific environment, simply because i did not know what the possibilities were. I quickly abandoned this plan and developed one Weblogic Admin Console look and feel which adapts itself to the environment wherein it is deployed.

At most sites there is a way to determine if your host is running in a Development, Test, Acceptation or Production environment. The key data used to differentiate these environments depends on the infrastructure. It can be for example the IP-address, DNS name or Weblogic Domain name. A customer for example has standardized the weblogic domain names in such a way that the first position of the domain name corresponds with the environment. A Weblogic Development domain therefore always starts with a ‘D’, test with ‘T’, etc.  In this article i will show you how to make the Weblogic Console adapt its look and feel based on the Weblogic Domain name.

The Weblogic Admin Console login page is defined in /login/LoginForm.jsp which imports the MBeanUtils.class file. This class contains a lot of valuable methods. One of those methods, getDomainName() returns as it says the name of the Weblogic Domain. Simply by adding the following single line of Java as a JSP expression to LoginForm.jsp gives you the Weblogic domain name for which the Admin Console is opened. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Friday Feb 28, 2014

WebLogic troubleshooting: Diagnostic watch causing stuck threads by Tony van Esch

In one of our SOA/BPM environments, the stability of the WebLogic server running the SOA and BPM Suite was not as it should be. There were problems deploying ear files and accessing the BPM workspace etcetera. Enterprise Manager Fusion Middleware control homepage would show that everything is running fine. But accessing the soainfra pages would fail.

failed_to_get

In the AdminServer logs the following relevant entries were found. Apparently the AdminServer fails at communicating with the soa_server1 managed server. Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Wednesday Feb 26, 2014

Automatic Scaling an Application using WebLogic by René van Wijk

Say we want to add (or start) managed server instances when running an application, for example, when the number of open sessions reach a certain value. For this value we have calculated that the memory consumption is beyond a level, such that the garbage collection is affected. By adding (or starting) a new server we balance the load (the number of sessions with its corresponding memory consumption) across multiple servers. By using the WebLogic Diagnostic Framework, we can collect the metrics we need and create a watch for that metric with a corresponding notification. By using this notification we can then further create the logic needed in order to add (or start) a managed server. For example, by using the notification service that come with the WebLogic Diagnostic Framework we can send a JMS message or a JMX notification. In this post we are going to use the JMS approach. Environment The WebLogic environment consists of a cluster, spanning two machines, and consisting of four managed servers. This can be easily set-up by using the scripts presented in the post Automate WebLogic 12.1.2 Deployment. The diagnostic module is configured as follows - See more at: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Technorati Tags:

Monday Feb 24, 2014

WebLogic Hackathon: Automated Provisioning using Puppet by Ronald van Luttikhuizen

This presentation accompanies a hands-on-lab session in which Puppet will be used to automatically provision Oracle WebLogic Server. Puppet is a tool to automate configuration management.

Together with Chef it's one of the more popular configuration management tools at the moment. Puppet allows you to describe the desired (to-be) state of your servers by declaring resources. These declarations can describe user accounts, security settings, packages, directories, files, executable statements, services, and so on.

Manifests are the files in which resource declarations are listed. Puppet periodically applies manifests by translating manifests into specific commands (catalogs) and executes those on the managed servers. Puppet is capable of inspecting the machines so it only applies those changes that are necessary. If a machine is already in the desired state Puppet will apply no changes.

Read also the post: Hands-on-lab material available for WebLogic provisioning using Puppet !!

Get the presentation here.


WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Thursday Feb 20, 2014

Automatic Scaling an Application using WebLogic by René van Wijk

Say we want to add (or start) managed server instances when running an application, for example, when the number of open sessions reach a certain value. For this value we have calculated that the memory consumption is beyond a level, such that the garbage collection is affected. By adding (or starting) a new server we balance the load (the number of sessions with its corresponding memory consumption) across multiple servers. By using the WebLogic Diagnostic Framework, we can collect the metrics we need and create a watch for that metric with a corresponding notification. By using this notification we can then further create the logic needed in order to add (or start) a managed server. For example, by using the notification service that come with the WebLogic Diagnostic Framework we can send a JMS message or a JMX notification. In this post we are going to use the JMS approach. Environment The WebLogic environment consists of a cluster, spanning two machines, and consisting of four managed servers. This can be easily set-up by using the scripts presented in the post Automate WebLogic 12.1.2 Deployment. The diagnostic module is configured as follows - See more at: Read the complete article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Tuesday Feb 18, 2014

WebLogic Hackathon: Automated Provisioning using Puppet by Ronald van Luttikhuizen

This presentation accompanies a hands-on-lab session in which Puppet will be used to automatically provision Oracle WebLogic Server. Puppet is a tool to automate configuration management.

Together with Chef it's one of the more popular configuration management tools at the moment. Puppet allows you to describe the desired (to-be) state of your servers by declaring resources. These declarations can describe user accounts, security settings, packages, directories, files, executable statements, services, and so on.

Manifests are the files in which resource declarations are listed. Puppet periodically applies manifests by translating manifests into specific commands (catalogs) and executes those on the managed servers. Puppet is capable of inspecting the machines so it only applies those changes that are necessary. If a machine is already in the desired state Puppet will apply no changes.

Read also the post: Hands-on-lab material available for WebLogic provisioning using Puppet !!

Get the presentation here.


WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Monday Feb 03, 2014

Automate WebLogic Installation and Configuration by René van Wijk

In this post, we will show how to create automation scripts in order to set-up middleware environments.

Preparation

As an example, we will use the Oracle Service Bus. In the example, we will use the following software

First, we have to decide how the directory structure will look, for example.

Installation

To silent install JRockit, we need the following XML file - See more here!

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Monday Dec 30, 2013

Cloud Control: Automatic refresh of Weblogic domain members by Tony van Esch

enable_refresh_domain_jobIt’s a fact that Weblogic domains are dynamic in nature, especially when SOA components are involved. Out of the box Cloud Control does not update the target list of a Weblogic domain. Ofcourse you can manually trigger a refresh of the Weblogic domain, but it would be much better to automate this procedure.

Automation can be achieved by enabling the ‘refresh domain’ job per domain.

Go to a domain and under the ‘General’ tab, click on the ‘Weblogic Domain Refreshed’ date.

To check the refresh jobs in Cloud Control, go to Enterprise > job > Activity Read the complete article here.


WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Monday Nov 18, 2013

Setup a 12c Fusion Middleware Infrastructure by René van Wijk

In this post, we will show how to create automation scripts in order to set-up middleware environments.

Preparation
In the example, we will use the following software Oracle JDK Fusion Middleware Infrastructure (fmw_infra_121200.jar) which can be obtained from the Oracle Software Delivery Cloud.

Oracle HTTP Server (ohs_121200_linux64.bin) which can be obtained from the Oracle Software Delivery Cloud.

First, we have to decide which directory structure we are going to use. Below an example is given in which the binaries (that create the run-time) are separated from the configuration. - See more.

Installation To install a Fusion Middleware Infrastructure (that uses Oracle JDK as the Java Virtual Machine) we can use the following script - See more. Read the full article here.

WebLogic Partner Community

For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center.

Blog Twitter LinkedIn Mix Forum Wiki

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
23
24
25
26
27
28
29
30
31
      
Today