Wednesday Nov 28, 2012

Developing Spring Portlet for use inside Weblogic Portal / Webcenter Portal

The main difference between portlet workflow and servlet workflow is that, the request to the portlet can have two distinct phases:

1) Action phase
2) Render phase.

The Action phase is executed only once and is where any 'backend' changes or actions occur, such as making changes in a database.

The Render phase then produces what is displayed to the user each time the display is refreshed.

The critical point here is that for a single overall request, the action phase is executed only once, but the render phase may be executed multiple times. This provides a clean separation between the activities that modify the persistent state of your system and the activities that generate what is displayed to the user.

The dual phases of portlet requests are one of the real strengths of the JSR-168 specification. For example, dynamic search results can be updated routinely on the display without the user explicitly re-running the search. Most other portlet MVC frameworks attempt to completely hide the two phases from the developer and make it look as much like traditional servlet development as possible - we think this approach removes one of the main benefits of using portlets.
[Read More]

Tuesday Oct 02, 2012

Tuning Default WorkManager - Advantages and Disadvantages

Before Weblogic Server 9.0 release, we had the concept of Execute Queues. WebLogic Server (before WLS 9.0), processing was performed in multiple execute queues. Different classes of work were executed in different queues, based on priority and ordering requirements, and to avoid deadlocks. In addition to the default execute queue, weblogic.kernel.default, there were pre-configured queues dedicated to internal administrative traffic, such as weblogic.admin.HTTP and weblogic.admin.RMI.Users could control thread usage by altering the number of threads in the default queue, or configure custom execute queues to ensure that particular applications had access to a fixed number of execute threads, regardless of overall system load.[Read More]

Monday Aug 20, 2012

Weblogic Server - Developing Custom User Principal Object

The default security realm for WebLogic Server includes a WebLogic Principal Validation provider. A Principal Validation provider signs and verifies the authenticity of a specific type of principal. The WebLogic Principal Validation(which comes with weblogic server you can also write custom Principal Validation Provider) provider signs and verifies WebLogic Server principals. In other words, it signs and verifies principals that represent WebLogic Server users or WebLogic Server groups.

Authentication providers rely on Principal Validation providers to sign and verify the authenticity of principals (users and groups) contained within a subject.Verification of the subject's principals takes place during the WebLogic Server's demarshalling of RMI client requests for each invocation. The authenticity of the subject's principals is also verified when making authorization decisions.
[Read More]

Sunday Aug 19, 2012

J2EE - Connecting To HTTPS Site Using Simple Java Program When USing Proxy

In some cases we may have to connect to an HTTPS Site using simple Java Program when proxy is involved. Here in this article we are going to see how to connect. Here we are using HttpsURLConnection class.[Read More]

Saturday Aug 11, 2012

J2EE - Creating Clustered EJB Timer Services In Weblogic Server

The EJB timer service is an EJB-container provided service that allows you to create timers that schedule callbacks to occur when a timer object expires. Timer objects can be created for entity beans, message-driven beans, and stateless session beans. Timer objects expire at a specified time, after an elapsed period of time, or at specified intervals. For instance, you can use the timer service to send out notification when an EJB remains in a certain state for an elapsed period of time.[Read More]

J2EE - Creating Custom Cache Tool To Store User Sessions OutSide the Application Server.

Caching is useful for improving application performance and to prevent from OutOfMemory exceptions in Application Servers when huge data has to be stored in session. Some times you may have to store huge data in session. If there are many such users storing data into session you may lead to outofmemory and ApplicationServer goes down. Instead if you store session data in a separate JVM than where the Application Server is running, you won't stuck into memory issues. This blog entry will help you understand how this concept is implemented. Here I am going to discuss how the caching tool internally works by creating custom cash[Read More]

Thursday Aug 09, 2012

Coherence - Session Sharing between Applications Hosted on Different Application Servers / Hosted on Different WebLogic Domains

Session state in Java Web application is associated with a single (user) browser session. Sometimes there will be a requirement where  the session data has to be shared by "Between Web applications within the EAR" / "Between Web Applications" / "Between EARs" / "Between EARs located in Different Weblogic Server Domains" / "Between EARs located in Different Application Servers".

In weblogic Server there is an option to share session between web applications present within the EAR. But some time there might be a requirement to share the session "Between Web Applications" / "Between EARs" / "Between EARs located in Different Weblogic Server Domains" / "Between EARs located in Different Application Servers". We can achieve this only with the help of caching tool.

Coherence is one of the most popular caching tools available. With help of coherence we will store sessions in a different JVM from where the application is running (application on application server). This session is shared by different JVMs (Different Domains/Different Application Servers etc).
[Read More]

Friday Aug 03, 2012

Weblogic Portal - Create Custom WorkFlow

Please find Creating Custom Workflow documentation. But in the documentation you will not find the code in detail level. Now we are going to see that in detail.

If you are using a WLP repository and library services-enabled, you can enforce a workflow process when users add and publish content in the repository. WLP repositories include one default content workflow. You can create additional content workflows or customize content workflows to suit your business needs.

Refer Adding WorkFlow for adding the custom workflow. Please download the Default Workflow for your later reference. Once you add custom workflow, you may loose the default workflow.

[Read More]

Weblogic Portal - Refresh Single Portlet In Portal Desktop

Over the past few years, Web 2.0 and Ajax have influenced the development of interactive Web applications. You can use Ajax to send asynchronous requests to a server without refreshing the full page. The result is very appealing to the end user because the Web application seems to react immediately, and the user’s experience is similar to what he or she sees when using a desktop application. You can use the Single Portlet Refresh in use cases [Read More]

Thursday Aug 02, 2012

Weblogic Server - Monitor JDBC Resources via JMX API

To monitor JDBC Resources of a domain there are two ways.

1) Directly accessing each Managed Server (Runtime MBean Server)

2) Via Admin Server (Domain Runtime MBean Server) .

Advantages in using Domain Runtime MBean Server:

* Your code only needs to construct a single URL for connecting to the Domain Runtime MBean Server on the Administration Server. Thereafter, the code can look up values for all server instances and optionally filter the results.

* If your code uses the Runtime MBean Server to read MBean values on multiple server instances, it must construct a URL for each server instance, each of which has a unique listen address/listen port combination.

[Read More]

Handling Runtime Exceptions By Redirecting The Logs Using Log4j

Recently I came across a requirement where all the Runtime Exceptions(Unchecked) that are occured during runtime should be redirected to file with the help of log4j. One way is to handle all the above exceptions in the application using try/catch or Throws. But if they are not handled in the application(and it cannot be done
always as these are runtime exceptions), and during runtime if it occurs it won't be good to show the exception to the end clients. It would be good if we redirect
the page to underconstruction page and also the exception should be known to System Admin or the Application Support Team.
[Read More]
About

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today