The XSD files for WebLogic Server 12.1.2 are located from this landing page:
http://www.oracle.com/webfolder/technetwork/weblogic/index.html
Or directly on the 12.1.2 specific page:
http://www.oracle.com/webfolder/technetwork/weblogic/wls_12.1.2.0.html
29 August 2013
23 August 2013
WebLogic Server 12.1.2 - Zip File Updates
I love the zip file distribution. It's the flavour of WLS I mostly use. Unzip, configure, go. Delete it to remove it, start all over again. Install it from a Maven goal. Easy.
[sbutton@mbp] $ unzip ~/Downloads/WLS/1212/PROD/wls1212_dev.zip
Archive: /Users/sbutton/Downloads/WLS/1212/PROD/wls1212_dev.zip
creating: wls12120/
creating: wls12120/coherence/
creating: wls12120/coherence/bin/
creating: wls12120/coherence/lib/
creating: wls12120/coherence/lib/security/
creating: wls12120/coherence/plugins/
creating: wls12120/coherence/plugins/maven/
...
...
inflating: wls12120/wlserver/common/bin/clonedunpack.cmd
inflating: wls12120/wlserver/common/bin/commEnv.cmd
inflating: wls12120/wlserver/common/bin/config.cmd
inflating: wls12120/wlserver/common/bin/config_builder.cmd
inflating: wls12120/wlserver/common/bin/pack.cmd
inflating: wls12120/wlserver/common/bin/prepareCustomProvider.cmd
inflating: wls12120/wlserver/common/bin/qs_config.cmd
inflating: wls12120/wlserver/common/bin/reconfig.cmd
inflating: wls12120/wlserver/common/bin/unpack.cmd
inflating: wls12120/wlserver/common/bin/wlsifconfig.cmd
inflating: wls12120/wlserver/common/bin/wlst.cmd
inflating: wls12120/wlserver/common/deployable-libraries/active-cache-1.0.jar.pack
inflating: wls12120/wlserver/common/deployable-libraries/jsf-1.2.war
inflating: wls12120/wlserver/common/deployable-libraries/jsf-2.0.war
...
...
inflating: wls12120/wlserver/common/bin/wlst.sh
inflating: wls12120/wlserver/server/bin/setWLSEnv.sh
inflating: wls12120/wlserver/server/bin/startNodeManager.sh
inflating: wls12120/wlserver/server/lib/unix/nodemanager.sh
[sbutton@mbp] $ cd wls12120
[sbutton@mbp] $ ./configure.sh
**************************************************
WebLogic Server 12g (12.1.2.0) Zip Configuration
MW_HOME: /tmp/wls12120
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
Note: MW_HOME not supplied, default used
**************************************************
...
...
...
...Unpacking done 0 to go
Your environment has been set.
Configuring WLS...
BUILD SUCCESSFUL
Total time: 1 second
Do you want to configure a new domain? [y/n]? Y
<21/08/2013 12:05:41 PM CST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<21/08/2013 12:05:41 PM CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<21/08/2013 12:05:42 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.7-b01 from Oracle Corporation.>
<21/08/2013 12:05:42 PM CST> <Info> <Management> <BEA-140013> </private/tmp/wls12120/user_projects/domains/mydomain/config not found>
<21/08/2013 12:05:42 PM CST> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server: ********
For confirmation, please re-enter password required to boot WebLogic server: ********
<21/08/2013 12:05:49 PM CST> <Info> <Management> <BEA-141254> <Generating new domain directory in /private/tmp/wls12120/user_projects/domains/mydomain.>
<21/08/2013 12:05:57 PM CST> <Info> <Management> <BEA-141255> <Domain generation completed in 8,737 milliseconds.>
<21/08/2013 12:05:57 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.2.0.0 Fri Jun 7 15:16:15 PDT 2013 1530982 WLS_12.1.2.0.0_GENERIC_130607.1100>
<21/08/2013 12:05:59 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<21/08/2013 12:05:59 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
<Aug 21, 2013 12:05:59 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file /private/tmp/wls12120/user_projects/domains/mydomain/servers/myserver/logs/myserver.log is opened. All server side log events will be written to this file.>
<Aug 21, 2013 12:06:02 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Aug 21, 2013 12:06:02 PM CST> <Warning> <Store> <BEA-280109> <Unable to load the native wlfileio library for the persistent file store "_WLS_myserver". The store will use buffered I/O. The store is still operating in a transactionally safe synchronous mode. See store open log messages for the requested and final write policies.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fdfa:13b7:e006:7177:196:ad1b:8c13:ef38:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.187.112.164:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "myserver" for domain "mydomain" running in development mode.>
<Aug 21, 2013 12:06:05 PM CST> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1, fe80:0:0:0:0:0:0:1%1.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
At this point there is now a new domain called "mydomain" running and available on the default WLS port of 7001 protected with the credentials specified during the configuration process.
This process can be used immediately, or it can be stopped using any of the standard process control methods and restarted using the scripts in the generated domain directory, per the following:
Generating new domain directory in /private/tmp/wls12120/user_projects/domains/mydomain
As a final point, the zip file can be installed into a Maven repository using whatever coordinates you wish, then referenced and used with the weblogic-maven-plugin install goal to perform a local installation operation of the server.
Combined with the subsequent execution of the weblogic-maven-plugin create-domain and start-server goals, a fully operational server can be created from Maven in a short matter of time, ready and waiting to accept application deployments.
Small point to note is that the zip file distribution has been pulled down from OTN for the last couple of days (20 Aug 2013) while we fix a minor problem relating to the launching of the Configuration Wizard in this specific distribution. Should be back up today or tomorrow (23 Aug 2013).With the release of WLS 12.1.2 now available and getting some decent download traction, I thought I'd make a few comments about the zip file distribution as it has some minor changes in this version:
- It now contains an outer level directory wls12120, in which the zip file contents are stored. Previously the contents were stored in an outer level directory.
- The configure.sh|cmd script now has an option to run in "silent" mode, where the progress of the configuration process is not displayed to the console.
- At the end of the configuration process you are now asked if you'd like to create a domain. If the answer is yes, the relevant details are asked for and a new domain created and started. This enables you to configure and start up a server from the one simple script.
[sbutton@mbp] $ unzip ~/Downloads/WLS/1212/PROD/wls1212_dev.zip
Archive: /Users/sbutton/Downloads/WLS/1212/PROD/wls1212_dev.zip
creating: wls12120/
creating: wls12120/coherence/
creating: wls12120/coherence/bin/
creating: wls12120/coherence/lib/
creating: wls12120/coherence/lib/security/
creating: wls12120/coherence/plugins/
creating: wls12120/coherence/plugins/maven/
...
...
inflating: wls12120/wlserver/common/bin/clonedunpack.cmd
inflating: wls12120/wlserver/common/bin/commEnv.cmd
inflating: wls12120/wlserver/common/bin/config.cmd
inflating: wls12120/wlserver/common/bin/config_builder.cmd
inflating: wls12120/wlserver/common/bin/pack.cmd
inflating: wls12120/wlserver/common/bin/prepareCustomProvider.cmd
inflating: wls12120/wlserver/common/bin/qs_config.cmd
inflating: wls12120/wlserver/common/bin/reconfig.cmd
inflating: wls12120/wlserver/common/bin/unpack.cmd
inflating: wls12120/wlserver/common/bin/wlsifconfig.cmd
inflating: wls12120/wlserver/common/bin/wlst.cmd
inflating: wls12120/wlserver/common/deployable-libraries/active-cache-1.0.jar.pack
inflating: wls12120/wlserver/common/deployable-libraries/jsf-1.2.war
inflating: wls12120/wlserver/common/deployable-libraries/jsf-2.0.war
...
...
inflating: wls12120/wlserver/common/bin/wlst.sh
inflating: wls12120/wlserver/server/bin/setWLSEnv.sh
inflating: wls12120/wlserver/server/bin/startNodeManager.sh
inflating: wls12120/wlserver/server/lib/unix/nodemanager.sh
[sbutton@mbp] $ cd wls12120
[sbutton@mbp] $ ./configure.sh
**************************************************
WebLogic Server 12g (12.1.2.0) Zip Configuration
MW_HOME: /tmp/wls12120
JAVA_HOME: /Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home
Note: MW_HOME not supplied, default used
**************************************************
...
...
...
...Unpacking done 0 to go
Your environment has been set.
Configuring WLS...
BUILD SUCCESSFUL
Total time: 1 second
Do you want to configure a new domain? [y/n]? Y
<21/08/2013 12:05:41 PM CST> <Info> <Security> <BEA-090905> <Disabling the CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true.>
<21/08/2013 12:05:41 PM CST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true.>
<21/08/2013 12:05:42 PM CST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 23.7-b01 from Oracle Corporation.>
<21/08/2013 12:05:42 PM CST> <Info> <Management> <BEA-140013> </private/tmp/wls12120/user_projects/domains/mydomain/config not found>
<21/08/2013 12:05:42 PM CST> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server: ********
For confirmation, please re-enter password required to boot WebLogic server: ********
<21/08/2013 12:05:49 PM CST> <Info> <Management> <BEA-141254> <Generating new domain directory in /private/tmp/wls12120/user_projects/domains/mydomain.>
<21/08/2013 12:05:57 PM CST> <Info> <Management> <BEA-141255> <Domain generation completed in 8,737 milliseconds.>
<21/08/2013 12:05:57 PM CST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 12.1.2.0.0 Fri Jun 7 15:16:15 PDT 2013 1530982 WLS_12.1.2.0.0_GENERIC_130607.1100>
<21/08/2013 12:05:59 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<21/08/2013 12:05:59 PM CST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool.>
<Aug 21, 2013 12:05:59 PM CST> <Notice> <Log Management> <BEA-170019> <The server log file /private/tmp/wls12120/user_projects/domains/mydomain/servers/myserver/logs/myserver.log is opened. All server side log events will be written to this file.>
<Aug 21, 2013 12:06:02 PM CST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Aug 21, 2013 12:06:02 PM CST> <Warning> <Store> <BEA-280109> <Unable to load the native wlfileio library for the persistent file store "_WLS_myserver". The store will use buffered I/O. The store is still operating in a transactionally safe synchronous mode. See store open log messages for the requested and final write policies.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Log Management> <BEA-170027> <The server has successfully established a connection with the Domain level Diagnostic Service.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on fdfa:13b7:e006:7177:196:ad1b:8c13:ef38:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 10.187.112.164:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[3]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000331> <Started the WebLogic Server Administration Server "myserver" for domain "mydomain" running in development mode.>
<Aug 21, 2013 12:06:05 PM CST> <Warning> <Server> <BEA-002611> <The hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1, fe80:0:0:0:0:0:0:1%1.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING.>
<Aug 21, 2013 12:06:05 PM CST> <Notice> <WebLogicServer> <BEA-000360> <The server started in RUNNING mode.>
At this point there is now a new domain called "mydomain" running and available on the default WLS port of 7001 protected with the credentials specified during the configuration process.
This process can be used immediately, or it can be stopped using any of the standard process control methods and restarted using the scripts in the generated domain directory, per the following:
Generating new domain directory in /private/tmp/wls12120/user_projects/domains/mydomain
As a final point, the zip file can be installed into a Maven repository using whatever coordinates you wish, then referenced and used with the weblogic-maven-plugin install goal to perform a local installation operation of the server.
Combined with the subsequent execution of the weblogic-maven-plugin create-domain and start-server goals, a fully operational server can be created from Maven in a short matter of time, ready and waiting to accept application deployments.
20 August 2013
WLS 10.3.6 Transaction Logs in Database
Was talking to one of our local partners yesterday who's in the middle of an infrastructure build for FMW using a 3rd party cloud provider. He mentioned he was looking at how to handle the JTA transaction logs for their HA requirements without being able to rely on shared storage being available.
I mentioned that we'd added support for storing the XA logs in the database in WLS 10.3.6, which should make both his initial setup, replication and recovery processes more straight forward.
http://docs.oracle.com/cd/E23943_01/web.1111/e13852/toc.htm#BGGHGHBC
I mentioned that we'd added support for storing the XA logs in the database in WLS 10.3.6, which should make both his initial setup, replication and recovery processes more straight forward.
http://docs.oracle.com/cd/E23943_01/web.1111/e13852/toc.htm#BGGHGHBC
JTA
You can configure a JDBC TLOG store to persist transaction logs to a database, which allows you to leverage replication and HA characteristics of the underlying database, simplify disaster recovery, and improve Transaction Recovery service migration. See "Using a JDBC TLog Store" in Configuring Server Environments for Oracle WebLogic Server.
WebLogic Server 12c (12.1.2) Documentation
The WebLogic Server documentation set has undergone a nice facelift in the 12c (12.1.2) release.
http://fmwdocs.us.oracle.com/vol/doclibs/middleware/production/E26099_01/wls/index.html
I find the breakdown sections generally quite useful to quickly locate the information I'm looking for, but I still regularly go directly to a specific book as a reference.
The entire book set is available here:
http://fmwdocs.us.oracle.com/vol/doclibs/middleware/production/E26099_01/wls/docs.htm
I also think the provision of the new mobi and epub formats is incredibly useful, allowing you to pull down a set of books onto a mobile device. I flew to Melbourne yesterday and was able to read over a set of docs on the plane that I'd pulled onto my iPad before I left.
I've been wondering if it'd be possible to provide some sort of library/multi-book selection option to allow multiple book selections to be made at once and have them downloaded as a library that can be pushed to a mobile device? I've not looked into it, but I think it'd be a nice usability feature. Does iBooks have any APIs that could support that? Will need to look int it at some point.
http://fmwdocs.us.oracle.com/vol/doclibs/middleware/production/E26099_01/wls/index.html
I find the breakdown sections generally quite useful to quickly locate the information I'm looking for, but I still regularly go directly to a specific book as a reference.
The entire book set is available here:
http://fmwdocs.us.oracle.com/vol/doclibs/middleware/production/E26099_01/wls/docs.htm
I also think the provision of the new mobi and epub formats is incredibly useful, allowing you to pull down a set of books onto a mobile device. I flew to Melbourne yesterday and was able to read over a set of docs on the plane that I'd pulled onto my iPad before I left.
I've been wondering if it'd be possible to provide some sort of library/multi-book selection option to allow multiple book selections to be made at once and have them downloaded as a library that can be pushed to a mobile device? I've not looked into it, but I think it'd be a nice usability feature. Does iBooks have any APIs that could support that? Will need to look int it at some point.
17 July 2013
WebLogic Server 12.1.2 Released
The WebLogic Server 12.1.2 release is now available for download from OTN.
Contains a raft of new features, check out the list in the What's New guide:
http://docs.oracle.com/middleware/1212/wls/NOTES/index.html#NOTES254
Lots of good stuff there, covering new development features as well as operational features such as dynamic servers, server templates and so forth.
On one of my favourite topics I've written about here in the past, I'm pleased to say that the WebSockets implementation made it into the release.
Take a look at the developer documentation we have for it here:
http://docs.oracle.com/middleware/1212/wls/WLPRG/websockets_sse.htm#WLPRG806
The small API is documented and available from the main WLS API page:
http://docs.oracle.com/middleware/1212/wls/WLAPI/overview-summary.html
Look for the weblogic.websocket package.
The ServerSent-Event feature that I'd described here as being under investigation didn't make it into the 12.1.2 release. There are plans are to look at it again for the next release.
Contains a raft of new features, check out the list in the What's New guide:
http://docs.oracle.com/middleware/1212/wls/NOTES/index.html#NOTES254
Lots of good stuff there, covering new development features as well as operational features such as dynamic servers, server templates and so forth.
On one of my favourite topics I've written about here in the past, I'm pleased to say that the WebSockets implementation made it into the release.
WebSockets
This release of WebLogic Server adds support for the WebSocket Protocol (RFC 6455), which provides two-way, full-duplex communication over a single TCP connection between clients and servers, where each side can send data independently from the other.
The WebSockets communication model occurs in real-time and promotes user interaction.
In WebLogic Server, you can use the WebSocket Protocol implementation and accompanying programming API to develop and deploy applications that communicate bidirectionally with clients.
For more information, including code examples, see "Using WebSockets in WebLogic Server" in Developing Applications for Oracle WebLogic Server.
Take a look at the developer documentation we have for it here:
http://docs.oracle.com/middleware/1212/wls/WLPRG/websockets_sse.htm#WLPRG806
The small API is documented and available from the main WLS API page:
http://docs.oracle.com/middleware/1212/wls/WLAPI/overview-summary.html
Look for the weblogic.websocket package.
The ServerSent-Event feature that I'd described here as being under investigation didn't make it into the 12.1.2 release. There are plans are to look at it again for the next release.
24 September 2012
ServerSent-Events on WebLogic Server
In addition to the WebSocket support we've added into the next major release of WebLogic Server (version 12.1.2 with all usual caveats with respect to release timeframes, no guarantee, etc.) we've also added support for the HTML5 ServerSent-Event model through collaborating with the GlassFish team and integrating the GlassFish ServerSent-Event feature.
The HTML5 ServerSent-Event model provides a mechanism to allow browser clients to establish a uni-directional communication path to a server, where the server is then able to push messages to the browser at any point in time.
A common JavaScript API (EventSource) is provided in modern browsers that allows the client to establish connections to the server and register callback functions to handle events as they come in over the connection, which can then be used to make any necessary page updates.
Some good sources of information on ServerSent-Events/EventSources are:
This new feature in WebLogic Server and GlassFish provides a small Java API and a couple of annotations that developers use to create and publish ServerSent-Event handlers, from which applications on the server can use to send messages to connected browser clients at any time, essentially enabling applications to push messages to clients over standard HTTP(S).
The runtime component of the feature uses CDI to instantiate and manage the handlers and support the injection of them into other application components as well as setting up and managing the asynchronous connection for each client.
Jitu from the GlassFish team provided some information on the feature earlier in the year:
Bhakti also from the GlassFish team has a posting with an example of a SSE application that fetches data from a twitter feed and republishes to clients:
Here it is running on a development build of WebLogic Server 12.1.2.
Besides being an interesting new feature with lots of possibilities, this also serves to demonstrate how the WebLogic and GlassFish teams are cooperating and producing innovative outcomes.
The HTML5 ServerSent-Event model provides a mechanism to allow browser clients to establish a uni-directional communication path to a server, where the server is then able to push messages to the browser at any point in time.
A common JavaScript API (EventSource) is provided in modern browsers that allows the client to establish connections to the server and register callback functions to handle events as they come in over the connection, which can then be used to make any necessary page updates.
Some good sources of information on ServerSent-Events/EventSources are:
This new feature in WebLogic Server and GlassFish provides a small Java API and a couple of annotations that developers use to create and publish ServerSent-Event handlers, from which applications on the server can use to send messages to connected browser clients at any time, essentially enabling applications to push messages to clients over standard HTTP(S).
The runtime component of the feature uses CDI to instantiate and manage the handlers and support the injection of them into other application components as well as setting up and managing the asynchronous connection for each client.
Jitu from the GlassFish team provided some information on the feature earlier in the year:
Bhakti also from the GlassFish team has a posting with an example of a SSE application that fetches data from a twitter feed and republishes to clients:
Here it is running on a development build of WebLogic Server 12.1.2.
Besides being an interesting new feature with lots of possibilities, this also serves to demonstrate how the WebLogic and GlassFish teams are cooperating and producing innovative outcomes.
18 September 2012
WebSockets on WebLogic Server
We've been busy working on putting in support for the WebSocket Protocol into WebLogic Server with the intent to include it in the next major release (usual caveats apply with respect to dates, times, features, etc.). Running the Autobahn WS Testsuite, which seems to be the industry defacto WebSocket compatibility verifier, we are seeing reports with very high levels of compatibility.
As there's no standard WebSocket Java API at this point, we've chosen to model the API on the Grizzly WebSocket API with some minor changes where necessary. Once the results of JSR-356 (Java API for WebSocket) becomes public, we'll look to implement and support that.
In the background we have also done some integration work with the earlier WebSocket-SDK that was being used as a vehicle for WebSocket API investigations in order to try it out and look at the SPI requirements -- but we won't expose it in WLS 12.1.2 and will wait for the formal Java API for WebSocket to be finalized.
Back to WLS 12.1.2 and it's WebSocket API, as an exercise, I just ported the Apache Tomcat WebSocket demo called snake to run on WLS.
The original Tomcat demo source is here:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/
Here it is running on a development build of WebLogic Server 12.1.2.
There are some differences in terms of handling of connections and the registration approach but it was a pretty straight forward exercise and took about 30 minutes. The demo didn't require too many major changes as the APIs are semantically similar in terms of accepting connections, handling messages and sending/broadcasting messages to clients. Thankfully I didn't have to do anything on the client JavaScript side ... :-)
We also have the Grizzy/GlassFish Chat demo running on WLS as well.
More info to come as we progress the documentation, etc. Should be some demos of this running at OOW this year too I'd guess.
As there's no standard WebSocket Java API at this point, we've chosen to model the API on the Grizzly WebSocket API with some minor changes where necessary. Once the results of JSR-356 (Java API for WebSocket) becomes public, we'll look to implement and support that.
In the background we have also done some integration work with the earlier WebSocket-SDK that was being used as a vehicle for WebSocket API investigations in order to try it out and look at the SPI requirements -- but we won't expose it in WLS 12.1.2 and will wait for the formal Java API for WebSocket to be finalized.
Back to WLS 12.1.2 and it's WebSocket API, as an exercise, I just ported the Apache Tomcat WebSocket demo called snake to run on WLS.
The original Tomcat demo source is here:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/examples/WEB-INF/classes/websocket/snake/
Here it is running on a development build of WebLogic Server 12.1.2.
There are some differences in terms of handling of connections and the registration approach but it was a pretty straight forward exercise and took about 30 minutes. The demo didn't require too many major changes as the APIs are semantically similar in terms of accepting connections, handling messages and sending/broadcasting messages to clients. Thankfully I didn't have to do anything on the client JavaScript side ... :-)
We also have the Grizzy/GlassFish Chat demo running on WLS as well.
More info to come as we progress the documentation, etc. Should be some demos of this running at OOW this year too I'd guess.
02 July 2012
JSF Managed Beans, @PostConstruct and CDI
In a similar vein to my last post, with this blog I'd like to try and raise the visibility of another bug that is being seen in a few different places, and for which there is already a patch available for it.
The basic issue here is that when an application is using JSF Managed Beans that in turn make use of the @PostContruct lifecycle annotation to execute some post-construction tasks, if the WEB-INF/beans.xml file is included and thus enables the CDI circuitry, the @PostConstruct method on the JSF ManagedBean is no longer invoked.
The good news is that if this scenario is part of your application design, then you can pick up and apply a patch for WLS 12c that will resolve the issue.
The relevant base bug # is 13703600 and the Smart Update patch ID is UXPH.
From what I've read in the bug logs, we're also looking to include this fix in one of the patch-set-updates (PSUs) we are providing, so anyone that applies the relevant PSU should automatically get this fix.
25 June 2012
Multipart File Upload with WLS 12c
Multipart File Upload with WLS 12c
Just a word for anyone out there looking to use the Servlet 3.0 file upload feature with WLS 12c.
If you use the annotation approach on the Servlet class, it works perfectly well
However if you use the web.xml file to specify or override specific values using the multipart-config settings, then we have a small issue when we parse and apply those settings to the underling configuration bean. This results in the maxFileSize value always being set to a value of 0.
Ultimately this manifests itself as a problem when uploading any file since the file size will always exceed the maximum allowed size of 0.
The good news is there's a fix already available for it -- if you run into it, look for the patch for bug#14915431 or SmartUpdate patch 8EC8.
Just a word for anyone out there looking to use the Servlet 3.0 file upload feature with WLS 12c.
If you use the annotation approach on the Servlet class, it works perfectly well
However if you use the web.xml file to specify or override specific values using the multipart-config settings, then we have a small issue when we parse and apply those settings to the underling configuration bean. This results in the maxFileSize value always being set to a value of 0.
Ultimately this manifests itself as a problem when uploading any file since the file size will always exceed the maximum allowed size of 0.
The good news is there's a fix already available for it -- if you run into it, look for the patch for bug#14915431 or SmartUpdate patch 8EC8.
04 April 2012
WebLogic and EJB 3.1 @Singleton @Startup with @PostConstruct
That's quite the mouthful of annotations ..
A question was posed recently on the WLS EJB OTN forum asking about why WLS doesn't correctly support this combination of annotations, where the method with the @PostConstruct annotation was not being called as expected.
I thought I'd check it out with a simple test, which I'm sharing here.
1. Using NetBeans, I created a new "Web Application" project and assigned it to use my local WebLogic Server 12c installation.
2.Within the project, I created an EJB 3.1 Singleton using the NetBeans wizard. Not that creating EJBs in Java EE 6 requires this sort of assistance any more, having done away with most of the gunk from earlier versions of the specification. With EJB 3.1, an EJB can now be just a class with annotations and the logic. That's it. Simple.
3. On the EJB 3.1 Singleton, I then added the @Startup annotation to indicate that the bean must be instantiated when the container starts. I also added a method which I annotated with @PostContruct to indicate it should be called after the class has been instantiated via its constructor. The method prints a message to standard out when it is called.
I also added an instance variable with a default value, that is subsequently changed in the init method. Accessing this from a servlet will also show whether the init method was invoked.
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sab.demo; import java.util.Date; import javax.annotation.PostConstruct; import javax.ejb.Singleton; import javax.ejb.LocalBean; import javax.ejb.Startup; /** * * @author sbutton */ @Singleton @Startup public class TestSingletonBean { private String TESTVAL = "IF YOU SEE THIS @POSTCONSTRUCT HAS NOT BEEN CALLED"; @PostConstruct void init() { TESTVAL = "@PostConstruct method was called on " + new Date(); System.out.printf("\n\nIn init: %s\n", TESTVAL); } public String getTestVal() { return TESTVAL; } }
5. Since this test app is making use of the new Java EE 6 ease-of-use features that support the deployment of EJBs in Web applications, I could simply deploy this web application to see if the EJB Singleton was started on deployment and whether the @PostConstruct method was called.
Looking on the console where WebLogic Server was started in NetBeans, the message from the init method is seen right after the application deployment completes.
This demonstrates that WebLogic Server is correctly handling EJB 3.1 with @Singleton, @Startup and @PostConstruct.
6. Taking it one minor step further.
To independently observe the value of TESTVAL to ensure it has been modified via the init method, in the same project (it's very handy this web and ejb cohabitation ...) I added a servlet using the @WebServlet annotation.
In the servlet, I used the @EJB annotation to obtain a reference to the @Singleton and displayed the result of calling its getTestVal method on the page.
To independently observe the value of TESTVAL to ensure it has been modified via the init method, in the same project (it's very handy this web and ejb cohabitation ...) I added a servlet using the @WebServlet annotation.
In the servlet, I used the @EJB annotation to obtain a reference to the @Singleton and displayed the result of calling its getTestVal method on the page.
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sab.demo; import java.io.IOException; import java.io.PrintWriter; import javax.ejb.EJB; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author sbutton */ @WebServlet(name = "TestServlet", urlPatterns = {"/TestServlet", "/test"}) public class TestServlet extends HttpServlet { @EJB TestSingletonBean singleton; protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); PrintWriter out = response.getWriter(); try { out.println(""); out.println(""); out.println("<title>Servlet TestServlet</title>"); out.println(""); out.println(""); out.println("<h1>Servlet TestServlet at " + request.getContextPath() + "</h1>"); out.printf("<p>Singleton TESTVAL: %s</p>", singleton.getTestVal()); out.println(""); out.println(""); } finally { out.close(); } } }
7. Calling this from a browser shows the value of TESTVAL to be that set in the init method.
So in summary, this simple example shows WebLogic Server 12c supporting the EJB @Singleton and @Startup semantics correctly.
Subscribe to:
Posts (Atom)