Showing posts with label OracleAS. Show all posts
Showing posts with label OracleAS. Show all posts

Tuesday, November 20, 2007

Oracle Open World 2007: presentations available online

For the first time since 2001, I was not participating at OOW... As you may know I have moved back to France and now working for a new company Sogeti. So I am quite happy to se that once again all the presentations are available for download there:

I personnaly looked at OracleAS and Java presentations, and especially the one regarding SOA, performances, security and web Services:
Some other presentations that I would like to read/see:
  • Java EE/Java SE/Java Authorization Contract for Containers (JACC) Security in a Nutshell
  • A New Approach to Diagnosing Java Application Performance
  • Next-Generation Web Services Infrastructure and Interoperability
  • Performance Management for SOA Applications
and I will take more time do read some others...

Thursday, November 8, 2007

A Groovier ADF with Oracle ADF 11

Steve Muench has published in Oracle Magazine an article about the use of Groovy in Oracle ADF. In this article you learn how you can do validation and calculation in you business service layer.

Tuesday, July 10, 2007

BPEL in Cluster: In which node my process is working

I was helping a customer with his BPEL in cluster and we needed to follow the flow and on which machine the instance was running.

I simply use a bpel:exec activity with the following code:
java.net.InetAddress addr = null;
try {
  addr = java.net.InetAddress.getLocalHost();
}
catch (Exception e) {
System.out.println("EXCEPTION :"+ e);
}
setVariableData("HostNameVariable", addr.getCanonicalHostName());
This code is just an example of what could be done. Here I am using java.net code API and put the result in a BPEL global variable using the setVariableData method. Obviously you will use appropriate code to differenciate the different nodes for example the name of the OC4J instance, hostname, ... or any interesting value.

Monday, May 21, 2007

Oracle Development Kit for Spring

To help you better understand the support Oracle offers to Spring developers, everything you need to get started with Spring on Oracle Containers for Java EE is now available in the Oracle Development Kit for Spring. Whether you're new to Spring or an old hand, you're sure to benefit from the contents of the Development Kit:

  • A comprehensive set of How-To examples illustrating Spring-OC4J integration
  • The Oracle Developer Depot Web application, which enables you to deploy and run the How-To projects on OC4J
  • A Spring extension to JDeveloper, Oracle's free Java IDE
  • Supporting documentation and white papers
The Kit is available as a self-extracting ZIP archive. Note that you will need Oracle Containers for Java EE (10.1.3.2) or higher to use all of the How-To projects provided.

Wednesday, May 16, 2007

OracleAS & JDeveloper: JavaEE 5.0 Technology Preview

During JavaOne last week Oracle has announced the availability of a the new JavaEE 5.0 Technology Preview of Oracle Containers for JavaEE and JDeveloper (release 11). Find more information on OTN:

Wednesday, April 18, 2007

Using Groovy within Oracle Data Integrator

As you may remember, Oracle acquired few months back a data integration solution from Sunopsis, and has integrated it in our product under the name "Oracle Data Integrator" (ODI).

One of the first thing that I look when we got this product was the support for Scripting technologies, since it makes lot of sense to have such support in any ETL. And yes ODI has support for Jython (thought BSF). So when the dev team joined Oracle, I've asked the following question "did you try to use Groovy?"... I personnaly did not take the time to test, but one of the developer did and document it in his blog: "Using Groovy and ODI" from Thierry. When I get a chance I will provide a more complete sample of using Groovy in Oracle Data Integrator.

Friday, March 23, 2007

Tangosol is joing the Oracle family

During The Server Side Symposium in Vegas, Thomas Kurian announced that Oracle is acquiring Tangosol, during the keynote, Cameron Purdy (Tangosol's CEO) has demonstrated how cool Coherence can be, and they have presented how it could be used in the context of XTP (Extreme Transaction Processing). Soon more to come about this in the different technical side and blog of the Oracle's community.

Wednesday, March 7, 2007

JavaEE 5 Features of OracleAS 10gR3

OracleAS 10g R3 (10.1.3.x) is a certified J2EE 1.4 container, but OracleAS provides already support to some of the features of the Java Enterprise Edition 5: JavaEE 5. One of the key driver of the new EE version was simplification of the development and deployment applications. Here is the list of the JavaEE 5 features that are supported in OracleAS 10gR3 that will simplify the development of applications (in comparison to a standard J2EE 1.x development):

  • Java Persistence API (JPA) and EJB 3.0 (documention)
  • Support of shared library at the EAR level (<library-directory> / applib). (documentation). This comes in addition to the OracleAS 10gR3 classloader framework that allows administrators to create, and version shared libraries that can be used into applications by referencing them in the deployment plan.
  • Annotations Based Web Services (JSR181) that could be used for Java classes and EJB3 Session Beans (documentation)
  • Referencing resources using annotations in the Web container: @EJB, @Resource, @Resources, @PostConstruct, @PreDestroy, @PersistenceUnit, @PersistenceContext, @WebServiceRef, @DeclaresRoles, @RunAs (documentation)
Hope that this small summary will give you the opportunity to test some of the features of OracleAS 10g.

Friday, March 2, 2007

Netbeans : OC4J support available

It has been a long time that I did not look in the update center and development wiki of Netbeans. And I have been very pleased to see that it is possible now to register OC4J 10g as a server in Netbeans 5.5 (and 6.0). To add it in your environment just do a :

  • Tools > Update Center
  • Select "Netbeans Update Center Beta"
  • Select OC4J 10g
You can then configure a new Server and run/stop the server from your IDE. You can follow the development of this plugin directly in the Netbeans Wiki OC4J Support page.

Tuesday, February 27, 2007

Spring and Oracle: I21 blog entry about Oracle contribution to Spring

Rod Johnson in the Interface21 team blog entry named "Oracle Contributing Oracle Application Server Integration Code to Spring Framework" described the contribution of Oracle to Spring framework.

This contribution allows Spring applications to leverage the OracleAS transaction manager and its features. In addition to this contribution and some previous investments of Oracle in Spring, see the Oracle and Spring page of OTN; Oracle continues to invest more and more in Spring, as contributor or as user since, as stated by Rod, Spring has an important roles in Oracle Fusion Middleware, and its upcoming Services Component Architecture offering.

Monday, February 26, 2007

OC4J tip: changing the server information

When you are running OC4J in stand alone mode you are using the HTTP server that is bundle with it. This HTTP server returns by default for the HTTP information the following information: Server: Oracle Containers for J2EE If you want to change that you just need to set the http.server.header property. For example, java -Dhttp.server.header="My blog on Oracle" -jar oc4j.jar will now look like:
HTTP/1.1 200 OK
Date: Mon, 26 Feb 2007 21:52:53 GMT
Server: My blog on Oracle
Last-Modified: Mon, 09 Oct 2006 19:17:10 GMT
Accept-Ranges: bytes
Content-Length: 19882
Connection: close
Content-Type: text/html

Thanks to James Kirsh for this very useful tip...

Tuesday, November 28, 2006

OC4J: Sending system level message in the console window

OracleAS 10gR3, so OC4J standalone, is using the standard Java logging framework. Some of the benefits are easy configuration, and extensibility. The configuration of the level of logging of the different loggers has been exposes in the Oracle Application Server Console. To see the logger configuration, click on the Administration Tab and then Logger Configuration, you can then configure the different loggers.

Oracle ASC Logger Configuration

By default the logger will write all the information in the default log.xml file, and for application lever logger it will go in the application.log. You may want to send the information in the console during development to debug/analyze your application. This is done using the configuration of the Handler. This information is currently not available in the Application Server Console, so I am documenting in the next steps how to send the information in the console (terminal window).

The configuration of the OracleAS Logging is saved in the $ORACLE_HOME/j2ee/home/config/j2ee-logging.xml file. In this file you  can see that Oracle has defined various handlers where information can be sent:
  • console-handler : Log the information in the console (the one we want to use in this sample)
  • oc4j-handler : the default handler for most of the loggers, saving the information in the $ORACLE_HOME/j2ee/home/log/oc4j/log.xml using the Oracle Logger formatting
  • oracle-webservices-management-auditing-handler : the handler used by the Web Services Auditing feature in the $ORACLE_HOME/j2ee/home/log/wsmgmt/auditing/log.xml 
  • oracle-webservices-management-logging-handler : the handler used by the Web Service Logging feature in the $ORACLE_HOME/j2ee/home/log/wsmgmt/logging/log.xml 
As you may know, OracleAS Web Service provides out of the box support for Auditing of the SOAP messages. You just need to go in the administration page of the Web Service and enable the auditing. By default the messages are logged in the auditing log pointed above. But during development it is really interesting to see the SOAP Messages in the console without having to configure a Proxy to capture the request/response. The easiest way to do that is to edit the j2ee-logging.xml file and associate the console-handler to the auditing logger using the following configuration:

      <logger name="oracle.webservices.management.auditing" level="NOTIFICATION:1" useParentHandlers="false">
         <handler name="oracle-webservices-management-auditing-handler"/>
         <handler name="console-handler"/>
      </logger>
by doing this you will see the SOAP Message in the OC4J console that is running in your system.

console-ws

You can also use this configuration with any loggers available in OC4J.

Monday, March 13, 2006

Oracle Industrial Telnet Server (ITS): The OracleAS Hidden Treasure..

When I was working in Oracle Consulting I was surprised to see how many customers are using character mode applications, base on Oracle Forms. Lot of applications in wharehouses, harbour, ... are using telnet terminal, usually remote/mobile using RF networks.

Moving to Java on the server was very hard for them because of the lack of support for easy character mode development based solutions.

OracleAS 10g/ADFprovides such support with the Industrial Telnet Server (ITS). ITS is the telnet server running in a J2EE container as a J2CA adaptor, and uses JavaServer Faces to render the user interface. The advantage of using JSF for the UI, it allows developer to leverage automatically different renderers (HTML, Mobile and telnet) without changing the application.

Here an example of the different renderer provided by Oracle ADF Faces (Instant Messaging, PDA, HTML and Telnet) jsf-renderer.PNG

If you are looking for more information around Oracle ITS:

Thursday, March 2, 2006

Oracle Fusion Middleware and Microsoft Interoperability - Developer's Guide

Download the Beta version of the Oracle Application Server Developer's Guide for Microsoft Office Interoperability along with sample code (and other technical resources) from this new OTN page.

  • Windows Platform: Fusion Middleware is concurrently tested and delivered on Windows.
  • .NET/Windows Server System Integration: Fusion Middleware offers broad integration with Microsoft .NET and Windows Server System at multiple levels.
  • Office Interoperability: Fusion Middleware enables use of Office as the front-end for enterprise applications, as well as many ways to interact with enterprise information that can be read, parsed, and generated in Office-formatted documents.

Friday, November 11, 2005

Using Eclipse WTP and OracleAS/OC4J

You have probably heard about Web Tools Platform (WTP), this project extends Eclipse with various tools for developping J2EE applications. It contains editors for HTML, JSP, XML and so more... In addition to various wizards to create Web Services, EJB, Connector and more... WTP allows developers to package the application using J2EE standard packagind: EAR,WAR,RAR,JAR and deploy and run the application from the IDE.

The challenge here is not how you build J2EE components using an IDE, but more how do you package, deploy and run your application easily from the IDE. Eclipse WTP allows you like Oracle JDeveloper does, to package the various J2EE components in standard archives (JAR, WAR, EAR, RAR, ...) and deploy them to a J2EE container. WTP project has a very nice list of containers you can deploy to: Oracle, IBM, BEA, JBoss, Tomcat, ...


Supported Server
click to enlarge

With the latest build of Eclipse WTP (Release 1.0M8), Oracle Application Server 10g is now part of the default server list. So if your are an OracleAS user you can now use WTP and start to run and debut your application running in OracleAS from Eclipse.

What do you need to start using WTP and OracleAS:
  1. Download and install Eclipse WTP 1.0M8 from Eclipse site.
  2. Download and install OracleAS 10g (OC4J 10.1.3 Developer Preview 4) from OTN
  3. You must set a administrator password for OC4J using the start command
  4. Done! You can now use OC4J and Eclipse. I have a viewlet that shows the basic steps to create and run your first Web application.

OC4J configuration
Update (Nov,18) : I forgot to mention the Oracle Application Server Adapter tutorial from the Web Tools project.

Thursday, October 27, 2005

Installing Blojsom on OracleAS 10g (10.1.3)

I am using internally Blojsom for blogging about the product I am taking care of: OC4J and especially the Web Services stack. In this post I am quickly documenting, as the title says, how to install Blojsom on OracleAS 10g.

1-Download
The first thing to do is to download the product itself, just download the Blojsom quickstart from sourceforge.

2-Deploy
Since, Blojsom is distributed as a WAR file you have nothing special to do, just deploy it. Anyway I have created a viewlet  that shows step by step deployment using Oracle Enterprise Manager.

So the application link will be: http://localhost:8888/blojsom/

Note: if you want to use the command line utility (admin.jar) or the Ant deployment task, you should package the Web archive in an EAR file.

3-Update the home page
The easiest way will be to just change the index.html page to redirect to the default blog. The index.html page to be modified is in:

  • $ORACLE_HOME/j2ee/home/application/blojsom/blojsomXXXX/index.html
where blojsomXXXX is the name of the Web application generated during deployment.

4- Start blogging...

This is it...

Friday, September 16, 2005

Administer and Monitor OC4J using JConsole

OC4J 10g (10.1.3) is a J2EE 1.4 containers, so as part of the specifications, it supports JMX for management and deployment. One of the benefits of JMX is the fact that finally Java applications, and in our case the J2EE containers, have a standard based interface to be administered. OC4J exposes using its MBean Server system and application lever management beans (MBeans) that you can monitor and control from the Oracle Application Server Control (ASC) that is pre-deployed; but you can use any JMX client application. Sun has included as part of Java 5 JMX but also provides a standard JMX client called JConsole. This post is simply explaining how you can use the Sun's JConsole with OC4J.

  1. Set the environment:
    $ORACLE_HOME to the OC4J home
    $JAVA_HOME your JDK home
  2. Start the OC4J with the following property set

    $JAVA_HOME/bin/java  -Dcom.sun.management.jmxremote -jar oc4j.jar

    The -Dcom.sun.management.jmxremote system property creates an RMI connector to the MBeanServer, we will use this RMI connector from the console iself.

  3. Start the JConsole, with the following command, adding the OC4J administration class to the classpath.

    $JAVA_HOME/bin/jconsole -J-Djava.class.path=$JAVA_HOME/lib/jconsole.jar:$JAVA_HOME/lib/tools.jar;$ORACLE_HOME/lib/adminclient.jar
  4. The console will automatically ask you to connect to the OC4J process and you can start to monitor and administer your OC4J instance

    jconsole-1.PNG
    Connection to the OC4J MBean Server


     Java 5 JConsole browsing the OC4J MBeans

Saturday, March 26, 2005

PHP on OC4J??? Yes with JSR 223 RI

In this entry I am explaining how to use the JSR-223 Reference Implementation into Oracle Containers for J2EE (OC4J).

Note: I have done this only on Windows XP Platform, I did not test on Unix/Linux yet.

1-The first thing to do is to download the JSR-223 Reference Implementation from the JCP Web site.

2- Unzip the sjp-1_0-ea-windows-i586.zip in a directory let say d:\java\jsr223-ri.

3- You can choose here to do a proper installation (requires perl) or not. The *proper* installation preconfigure Apache Tomcat and the JSR-223 command line demonstration. Since what we are trying to achieve is to install the RI inside OC4J you do not need to do the installation.

4- Download this zip file that contains a Ant task and various files to configure and deploy the JSR223 sample into OC4J.

   4.1 To execute the Ant script you must start to set the following environman variables:

  • JAVA_HOME that points to the JDK home
  • ORACLE_HOME that points to the OC4J home (eg: d:\oracle\oc4j)
  • JSR223_HOME that points to directory where you have unzipped the JSR223 RI (eg d:\java\jsr223)

   4.2 Create a startup script for OC4J using the command

ant
The default target create a script names start-jsr223.bat in the %ORACLE_HOME%\bin directory. This script set various environment variable and start OC4J with the correct system parameters to load correctly the PHP scrip engine from Java.

   4.3 Start OC4J using the created script

%ORACLE_HOME%\bin\start-jsr223.bat

   4.4 Package and Deploy the Sample Application

ant deploy
This target packacge the Web samples from the reference implementation in a ear/war file, modifying the web.xml to define the different servlet mapping needed by JSR223.

5 Use the sample application

http://localhost:8888/jsr-223

You can start to use PHP in OC4J ;-) Take some time to read the sample code and specifications. JSR-223 is not only for Web container but also for JS2E, it is so interesting that the JSR-223 will probably be part of Mustang...

Monday, December 20, 2004

Eclipse and OC4J using the Lomboz Plugin

You can find a new How-To Document that explains how to use OC4J and Eclipse together using the Lomboz plugin. You can download the server definition files for the Production release of OC4J 10g (9.0.4) or for the J2EE 1.4 Developer Preview 10.1.3.

Wednesday, December 15, 2004

What's new in OC4J 10g (10.1.3) Developer Preview

Application Server Control

Management and monitoring support is provided by a new version of Enterprise Manager Application Server Control which is included directly within the OC4J 10g (10.1.3) Developer Preview 3 release.

Application Server Control is is fully JMX based and provides management and monitoring capabilities for this J2EE 1.4 compliant version of OC4J. It features a JSR-88 based deployment client with a powerful deployment plan editor, as well as a generic JMX MBean browser that is JSR-77 aware. Application (user-defined) MBeans are also supported to the same extent as system MBeans.

Other new areas of support include Web services management, TopLink session management, a JNDI browser, among many other new features.

  • Provides a generic JMX MBean browser that gives users a full view into all system MBeans. The new MBean browser provides features such as:
    • Hierarchical view of all system MBeans based on JSR-77 naming hierarchy
    • Comprehensive search capabilities across MBean, attribute and operation names, as well as support for searches using the JMX query syntax
    • Ability to view all MBean properties, such as attributes, operations, statistics, notifications
    • Ability to invoke operations. Users will be able to invoke operations that require complex types as input parameters based on String based constructors for those complex types where applicable
    • Ability to change attribute values where applicable
    • Ability to subscribe to JMX notifications
  • Application (user-defined) MBeans are supported to the same extent as system MBeans (see above) and are accessible via a link from the individual application home page
  • JMX Notifications that the user chooses to subscribe to will be received and listed on the Received Notifications page
  • Deployment follows JSR-88 and provides the following new features:
    • A generic and powerful JSR-88 deployment plan editor.
    • Comprehensive deployment progress messages during application deployments.
  • New Web service management capabilities providing features such as:
    • Enable/Disable
    • Performance
    • Logging
    • Auditing
    • Security
    • Reliability
  • TopLink session monitoring and management support
  • Improved log viewing and searching capabilities
  • A JNDI browser let users view the overall JNDI namespace, as well as application context namespaces
  • Many other new features in areas such as JMS, JTA, JDBC, etc.
Configuration, Administration and Deployment
  • Provides full support for JMX 1.2 and JMX Remote Access API (JSR-160)
  • Implements Java2 Management Specification (JSR-77) to provide JMX MBean controls for configuration and monitoring of the server and deployed applications
  • Implements Java2 Deployment API (JSR-88) to support standard deployment operations, uses a separate deployment plan to capture OC4J specific deployment details in a non intrusive manner. Deployment plans can be presented to server at deployment time to provide server with OC4J configuration set
  • Fine grained security controls to facilitate administration at the system and application only levels
  • A set of Ant tasks which utilize JSR-88 are provided to support deployment related operations from Ant scripts
  • Flexible classloading implementation which allows for the deployment of shared-libraries which can be consumed by deployed applications. Using the shared-library mechanism, applications have complete control over which class libraries are loaded, enabling the use of different XML parsers and Oracle JDBC driver versions than what are provided by default by OC4J
EJB
  • Toplink is now fully integrated as the default persistence manager for performing Container Managed Persistence (CMP) with Entity EJBs
  • Support for incremental EJB deployment, replacing individual class files instead of an entire EJB module
JMS
  • JMS 1.1 compatible with OJMS and OracleAS JMS
  • A generic JMS JCA 1.5 Resource Adapter
  • Complete integration of third party JMS providers into OC4J
  • JMX based dynamic configuration, management and monitoring of JMS infrastructure
Web Services
  • Ant tasks for developing Web services including:
    • assemble - generate a Web service from a Java class
    • topdownAssemble - generate a Web service from a WSDL
    • annotationAssemble - generate a Web service from JSR 181 annotations
    • ejbAssemble - generate a Web service from an EJB 2.1
    • jmsAssemble - generate a Web service from a JMS queue or topic
    • plsqlAssemble - generate a Web service from a PLSQL package
    • sqlAssemble - generate a Web service from a sql statement
    • dbJavaAssemble - generate a Web service from a Java class located in the Oracle Database
    • genGatewayService - generate a gateway service for third party Web service WSDLs
    • genProxy - generate a client proxy from a WSDL to invoke a Web service

    Information on these tasks and more is available in the OC4J 10.1.3 Developer Preview 3 Documentation Library.

  • An extended command line WebServicesAssembler tool providing the same functionality as the Ant tasks
  • A Web services management framework enabling users to SOAP auditing, content based logging, security and reliability. The framework enables administrators to enable and disable services as well as enable and disable management characteristics applied to those services. This framework is used by Application Server Control to provide Web services management configurability to system administrators and by JDeveloper to enable Web services management configuration during development
  • Support for the OASIS standard WS-Reliability
  • Support for SOAP 1.1 and SOAP 1.2
  • Support for a SOAP over JMS binding in addition to the existing SOAP over HTTP binding
  • Support for the OASIS standard WS-Security including authentication tokens, XML encryption and digital signatures. More information is available in the Security Release Notes.
  • This release of OC4J has been tested both as a consumer of OracleAS BPEL Process Manager business process WSDLs as well as producer of Web services that can be used in OracleAS BPEL Process Manager BPEL processes.
JCA
  • Compliant to JCA 1.5, also supports JCA 1.0 for backwards compatibility
  • Tested with Oracle and third-party Adapters
  • Management - JMX support (both standard and extensions) and Application Server Control for deployment, configuration, administration and metrics monitoring operations.
  • Persistence for JCA using Object-XML mapping in the Toplink component
  • Deployment enhancements:deployment for oc4j-ra.xml
  • 2PC recovery support including JCA
Security -- JAAS/JAZN
  • Implementation of Web Services security (OASIS WSS 1.0 specification)
  • Ability to integrate Oracle JAZN with 3rd party LDAP providers such as Sun One or Microsoft Active Directory. Please refer to Oracle Application Server Containers for J2EE documentation for detailed instructions.
Job Scheduler

The OracleAS Job Scheduler provides asynchronous scheduling services for J2EE applications with the following features:

  • API for submitting and controlling jobs
  • Temporal- and trigger-based job execution
  • Event listeners for monitoring job execution and status
  • iCalendar recurrence expression support
  • API-level JTA support for job submission and control
  • Automatic retry of failed jobs
  • Job blackout windows
  • Configurable persistence for job definitions and configuration
  • JMX monitoring and administration

For the latest documentation and sample applications see the Scheduler How-To's on OTN.

Application Clustering
  • Application clustering can be enabled on a specific application basis, enabling an OC4J instance to concurrently host both clustered and non clustered applications.
  • Support has been added for additional replication protocols. The protocols provided are multicast and peer-to-peer for in memory based state replication. The peer replication protocol supports direct TCP based connections between the members of a cluster group. A database replication protocol is also provided which stores and retrieved session state to and from a specified database instance.
  • The policies which determine when replication takes place have been extended in this release. Support is now provided for onCall, onChange, and onShutdown events. Web applications now default to using the onCall policy which queues up changes made to the HttpSession object within a method call and then send the change set when the method completes.