Tuesday, December 29, 2009

Wireless Internet Network (wifi) on American Airlines

Wifi is available on some of the American Airlines flight at the height of 31000 feet +, through gogo inflight wifi.

To access it for free using mobile device (including iphone), inflight, select the gogo wifi (available only on selected flights) and register for mobile device, enter the code MobileAA2009, good till december 31, 2009.

Thursday, December 24, 2009

Get a connection from datasource

Get a database connection from datasource:

Saturday, December 19, 2009

URL to Weblogic Portal 10.3 documentation

Generate a certificate using keytool

A trusted certificate can be generated and imported using the following command format:
To generate the trusted certificate:/>
keytool -genkey -keypass -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyalg rsa -alias

What is your first and last name?
[Unknown]:
What is the name of your organizational unit?
[Unknown]:
What is the name of your organization?
[Unknown]:
What is the name of your City or Locality?
[Unknown]:
What is the name of your State or Province?
[Unknown]:
What is the two-letter country code for this unit?
[Unknown]:
Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown correct?
[no]: yes

To import the trusted certificate:/>
keytool -export -keypass -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyalg rsa -alias -file

Sunday, November 22, 2009

Clipper Portlet, IFrame Portlet & WSRP Portlet

Clipper Portlet
A clipper portlet is a portlet that renders content (full or part) from another web site. A clipper portlet can include all or a subset of another web site’s content using a process called “web clipping.” You can clip all or part of another web site. Users can effectively view and interact with content from another web site without leaving the portal. The session of Clipper portlet is independent of session of the weblogic portal application.

IFrame Portlet
Also called Browser (URL) Portlets, display HTML content from an external URL; no development tasks are required to implement them. You can clip all or part of another web site. Users can effectively view and interact with content from another web site without leaving the portal.Browser portlets, also called Content URI portlets, are basically HTML portlets that use URLs to retrieve their content. Unlike other portlet types that are limited to displaying data contained within the portal project, browser portlets can display URL content that is outside from the portal project.

WSRP Portlet
Also called, remote portlets conform to the WSRP standard; they can be hosted within a producer application (simple producer or complex producer), and surfaced in a consumer application. WSRP Portlet (or Remote portlet or producer portlet) are the ones who are actually remote portlet and are supported by weblogic portal. All portlets that are created as part of weblogic portal application are by default remote portlets and available to be consumed by the consumer portal. Pages and Books can also be made remote and can be consumed as part of consumer portal. By setting the property "isRemote" for the portlet, it can be prohibitted to be available as remote portlet.

Which one to choose when?
Clipper and Browser porlets are not recommended to use for transactional purposes, they are meant to be for displaying view only contents from third party sites (part or full). However remote portlets (producer portlets) are available for the purpose of publishing as remote porltets and consuming them through consumer portlets. Separate sessions are maintained for each of these consumer and producer portal applications however Weblogic portal platform is responsible to maintain the session between the producer and consumer portals.

Oracle Weblogic Simple Producer

Oracle Weblogic Simple Producer (Version 10.3)

Oracle Weblogic Simple producer is a light version of Oracle Weblogic Portal + Oracle Weblogic Federated resources. From here onwards simple producer will be used to indicate Oracle Weblogic Simple Producer. Remote portlets deployed on producer can be consumed by the consumer portal using WSRP protocol.

A simple producer can be created using the following steps:

Step 1: Create the simple producer domain
Step 2: Create the simple producer project
Step 3: Move the existing application to simple producer project or create new application as required.
Step 4: Generate simple producer portlets, books, pages etc.
Step 5: Deploy the simple producer application on simple producer domain
Step 6: Consume the simple producer portlets and you are done.

Following features are supported by Simple Producer:
- Page flow & struts portlets can be created and published as remote portlets
- URL Rewriting is supported

Following features are not supported by Simple Producer:

  • Java, JSP, HTML, Clipper or Iframe portlets are not supported
  • Registration of remote portlets are not supported
  • No portal administration is available for simple producer
  • No Backing file support is available for simple producer
  • No event support is available for simple producer and thus inter portlet communication is also not available.
  • Render dependency file is not supported by simple producer
  • Portal APIs are not supported by simple producer

JSTL tag not working in Weblogic Portal 10

Problem: JSTL complex expressions are not recognized in weblogic portal version 10 and onwards. It complains that cannot resolve the complex expressions and throws jsp compilation errors as follows:

Caused by: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /package/JSPName.jsp
JSPName.jsp:165:13: Static attribute must be a String literal, its illegal to specify an expression.

Resolution: Replace the jstl taglib as http://java.sun.com/jsp/jstl/core for weblogic 10 and newer versions, for older versions it should be http://java.sun.com/jstl/core, jsp word is the key in the url for the taglib.

Junit test cases in Weblogic Workspace

How to run Junit from Weblogic Workspace without actually adding the library refrences from weblogic system libraries?

Open the project properties, build path and

1. Remove the following libraries from your Weblogic System Libraries

api.jar
wls-api.jar
weblogic.jar
wlcommons-logging.jar
junit.jar
wseeclient.jar

2. Add the following to the build path as external jar files
api.jar
wls-api.jar
weblogic.jar
wlcommons-logging.jar
junit.jar
wseeclient.jar
3. Compile the project and run the junit tests.

4. Thats it!

Not able to configure SAML

SAMLAuthenticator is not recognizing the alias and passphrase

Sometimes the way weblogic server is started, it does not recognize the DemoIdentity.jks and thats why we need to make the following changes to recognize this by weblogic server:

Go to weblogic admin console
Environment -> servers -> AdminServer -> Configuration -> Keystores
- change the value of Keystores to use “Custom Identity and Java Standard Trust”
- Enter the complete path of the DemoIdentity.jks in custom identity store field

Save the changes and redefine the SAMLAuthenticator.

Add proxy information to Server

Add the followings in the weblogic startup script to add the proxy configuration:

-Dhttp.proxyHost=[http-proxy-host-url]

-Dhttps.proxyHost=[https-proxy-host-url]

-Dhttp.proxyPort=[proxy-port]

-Dhttps.proxyPort=[ssl-port]

HttpConnectionURL Vs SoapHttpConnectionURL

How to make weblogic server to use HttpConnectionURL and not the SoapHttpConnectionURL (by default weblogic uses its own handler and thus creates the SoapHttpConnectionURL and not the HttpConnectionURL)?

Add the following in the startup script:

set JAVA_OPTIONS=%JAVA_OPTIONS% -DUseSunHttpHandler=true

EJB Client generation

EJB Client generation using workspace IDE

- Right click the ejb project – > Properties -> Weblogic EJB – > Jar Settings EJB Client Jar: enter the name of the client jar
- To build the client jar export the project as “EJB Jar File”, both the jars will be created, client as well as ejb jar.

EJB Client generation using ANT

- Add this @JarSettings(ejbClientJar = “xyzManagementClient.jar”) to the bean
- add desired EJBC flags directly to the build script where “weblogic.ejbc” is executed.