Portlet Types in Weblogic Portal

Amplify’d from docs.oracle.com

The following portlet types are supported by WebLogic Portal:

  • Java Server Page (JSP) and HTML Portlets – JSP portlets and HTML portlets point to JSP or HTML files for their content.

  • Java Portlets (JSR 168) – Java portlets produced using WebLogic Portal can be used universally by any vendor’s application server container that supports JSR 168.

  • Java Page Flow Portlets – Java page flow portlets use Apache Beehive page flows to retrieve their content.

  • Java Server Faces (JSF) Portlets – JSF portlets produced using WebLogic Portal conform to the JSR 127 specification.

  • Browser (URL) Portlets – Browser portlets display HTML content from an external URL; no development tasks are required to implement them.

  • Clipper Portlets – A clipper portlet is a portlet that renders content 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.” Clipper portlets are discussed in Creating Clipper Portlets.

  • Struts Portlets – Struts portlets are based on the Struts framework, which is an implementation of the Model-View-Controller (MVC) architecture.

  • Remote Portlets – WebLogic Portal’s remote portlets conform to the WSRP standard; they can be hosted within a producer application, and surfaced in a consumer application.

Read more at docs.oracle.com


JMS- Quick Refresher

Extracts from the original Sun J2EE 1.3 JMS documentation

Amplify’d from docs.oracle.com

A connection factory is the object
a client uses to create a connection with a provider. A connection factory
encapsulates a set of connection configuration parameters that has been defined
by an administrator. A pair of connection factories come preconfigured with
the J2EE SDK and are accessible as soon as you start the service. Each connection
factory is an instance of either the QueueConnectionFactory or
the TopicConnectionFactory interface.

j2eeadmin -addJmsFactory jndi_name queue
j2eeadmin -addJmsFactory jndi_name topic
Context ctx = new InitialContext();
QueueConnectionFactory queueConnectionFactory = 
  (QueueConnectionFactory) ctx.lookup("QueueConnectionFactory");
TopicConnectionFactory topicConnectionFactory = 
  (TopicConnectionFactory) ctx.lookup("TopicConnectionFactory");
3.1.1   Connection Factories

3.1.2   Destinations

A destination is the object a client
uses to specify the target of messages it produces and the source of messages
it consumes. In the PTP messaging domain, destinations are called queues,
and you use the following J2EE SDK command to create them:

j2eeadmin -addJmsDestination queue_name queue
Queue myQueue = (Queue) ctx.lookup("MyQueue");
3.2   Connections

A connection encapsulates a virtual connection
with a JMS provider. A connection could represent an open TCP/IP socket between
a client and a provider service daemon. You use a connection to create one
or more sessions.

QueueConnection queueConnection =
TopicConnection topicConnection = 
A session is a single-threaded context
for producing and consuming messages. You use sessions to create message producers,
message consumers, and messages. Sessions serialize the execution of message
listeners; for details, see Section 3.5.1,
“Message Listeners.”
Sessions, like connections, come in two forms,
implementing either the QueueSession or the TopicSession
interface. For example, if you created a TopicConnection object,
you use it to create a TopicSession:
3.3   Sessions
3.4   Message Producers

A message producer is an object created
by a session and is used for sending messages to a destination. The PTP form
of a message producer implements the QueueSender interface. The
pub/sub form implements the TopicPublisher interface.

QueueSender queueSender = queueSession.createSender(myQueue);
TopicPublisher topicPublisher = topicSession.createPublisher(myTopic);
3.5.1   Message Listeners
Message m = queueReceiver.receive();
Message m = topicSubscriber.receive(1000); // time out after a second

A message listener is an object that
acts as an asynchronous event handler for messages. This object implements
the MessageListener interface, which contains one method, onMessage.
In the onMessage method, you define the actions to be taken when
a message arrives.

3.5.2   Message Selectors

If your messaging application needs to filter the messages it receives, you can use a JMS API message selector, which allows a message consumer to specify the messages it is interested in. Message selectors assign the work of filtering messages to the JMS provider rather than to the application. For an example of the use of a message selector, see Chapter 8.

3.6   Messages

A JMS message has three parts:

3.6.3   Message Bodies

Table 3.2:    JMS Message Types






Read more at docs.oracle.com


Java XML JAXB tips

Schema Validation and Formatted Output

Amplify’d from www.java-tips.org

   Marshaller m = jc.createMarshaller();
              Boolean.TRUE );
        OutputStream os = new FileOutputStream
              "incorrectpo.xml" );
        m.marshal(po, os);

   SchemaFactory sf = SchemaFactory.newInstance(

   Schema schema = sf.newSchema(new File("po.xsd"));

Read more at www.java-tips.org


log4j- writing method names- use capital M and not small m

capitalization makes all the difference, you will still need small m though.

Amplify’d from www.theserverside.com
Thanks friend.

As you indicated, the %M pattern as indicated in the log4j manual works out.

Thanks for your help.

The point that i observed is that,

%m -message
%M – method name
%c- category
%C- Class name

Read more at www.theserverside.com