Wednesday, December 22, 2010

Reg: JSR portlets learning

Hi Venkata,

       I am Jeevak and I work on weblogic portal... I came across your blog and found that you would be right person to ask. I am working on JPF portlets and intend to work on JSR. can you please guide me a document where I can get the details about it.

Thanks in advance,


Best Regards,
Jeevak


Answer :
Please see the below link to learn JSR 168 portlets.
 
Thanks,
Venkat Sarvabatla

Monday, August 23, 2010

Running Multiple weblogic Domains in a single server

Question :
How to run two domains simultaneously? I have one domain running on 7001. I want to run second domain on 7010. How can I achieve it?


Answer :
You need to ensure that no other port conflicts , not just ListenPort (SSL port as well) (e.g. if you run pointbase locally and if each domain is using a separate instance then the pointbase db shouldnt use the same port) - there is also a port specified (For i think debug ), that should also be different. Why are you doing this though?
 
See the below link for best solution :
This helped..
http://www.jroller.com/gmazza/entry/reconfiguring_pointbase_databases_on_weblogic

Wednesday, August 11, 2010

How to create and use Webservice controls using WSDL in weblogic portal10.3

Question :

I have WSDL , How to create webservice controls using the WSDL in weblogic portal 10.3 and use those controls to invoke those webservice methods?
please give me the documents links for this.

Answer :

http://forums.oracle.com/forums/thread.jspa?threadID=974594

IPC between a Java Portlet and a JSP portlet

See the discussion link
http://forums.oracle.com/forums/thread.jspa?threadID=1111093&tstart=0

Thanks,
Venkat Sarvabatla

Thursday, August 5, 2010

Spring Portlets And Portal Communities

Question :
Can I get any pointers or tutorials on how to develop Spring Portlets JSR 168 compliant in Weblogic Portal 10g r3. Google is not proving reliable in this case.

And as well as documentation on communities in a portal application.

Answer :

There is a bunch of helpful information on running Spring apps as JSR168 portlets here:

http://static.springsource.org/spring/docs/2.0.x/reference/portlet.html
And for support for communities in WLP, I would suggest this documentation:
http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14255/com/bea/netuix/application/communities/package-summary.html#package_description

URL Compression

Solution  :
Go to the below forum link
http://forums.oracle.com/forums/thread.jspa?threadID=904595&tstart=0

Spring MVC Portlet minimize not working on Weblogic 10.3.0

Question :

We have written JSR 168 Portlets using spring MVC portlet framework. Everything works fine except for the minimize portlet functionality.

The title bar changes that is minimize becomes restore but the portlet body (content) is always visible.
Please let me know if any of you faced this issue and how to resolve it.
 
Answer :
 
From what I can see from the Spring DispatcherPortlet source (I used http://www.docjar.com/html/api/org/springframework/web/portlet/DispatcherPortlet.java.html ), it looks like this is a bug in the DispatcherPortlet. The JSR168 / JSR286 specification requires that portlets not render themselves during the render lifecycle if they are minimized, and I don't see any code in the DispatcherPortlet that checks for the portlet state. From the source in the URL above, it looks like if you added this code at line 701 inside of the doRenderService() method of DispatcherPortlet and re-compiled that code, it might work for you:


if(request.getWindowState().equals(javax.portlet.WindowState.MINIMIZED)) {

return;

}

Alternately, you can change your portlet.xml so instead of using the Java class org.springframework.web.portlet.DispatcherPortlet you point it at your own class:

package sample.package;

public class MinimizedAwareDispatcherPortlet extends org.springframework.web.portlet.DispatcherPortlet

{

@Override

protected void doRenderService(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws Exception {

if(request.getWindowState().equals(javax.portlet.WindowState.MINIMIZED)) {

return;

}

super.doRenderService(request, response);

}

}

Thanks,
Venkat Sarvabatla

Monday, May 10, 2010

Change desktop look and feel dynamically?

Hi


I will see if I can find the API that you are asking for and will keep you posted. Just wanted to share this another approach and see if this works for you.

I would try a different way to achieve what you want. From .portal file, create 2 Desktops from Portal Admin Console. Then for each Desktop, modify the look and fee that you want. The desktops can be named in such a way that the language initials will be in the end something like this:

http://yourHost:yourPort/yourWeb/appmanager/anyPortalName/en (English with corresponding look and feel)

http://yourHost:yourPort/yourWeb/appmanager/anyPortalName/fr (French with corresponding look and feel).

Now from Header or Footer, choose language drop down box, when they change the language, you can call java script function or in pageflow, your action method. Based on language they selected, construct the above url using request.getContextPath() etc etc. and Append the language in the end. This will be more dynamic. So in future if you add more languages, just create corresponding desktops and you should be good to go.

One of the main uses of Desktop approach is this one only. Like to have different customized Desktops with different look and feel and say even different books and pages (customized etc).

Also, when user changes the language, you can store this language value in his preferences (custom user preferences file). So once he logs in, in login pageflow (or backing file code), you can get this preference value and redirect to that Desktop. In this way, everytime user do not need to login and then change the language.

Some code snippet in Pageflow login() action method:
String baseUrl = this.getRequest().getContextPath(); //http://host:port/yourWeb

String selectedLanguage = "en"; // Get this from selected drop down box or in login portlet once user logs in from his preferences

String queryString = "/appmanager/somePortalName/" + selectedLanguage;

baseUrl = baseUrl + queryString; //http://host:port/yourWeb/appmanager/somePortalName/en

this.getResponse().sendRedirect(baseUrl.toString());

Try something along these lines.


And also Take a look at http://download.oracle.com/docs/cd/E13155_01/wlp/docs103//javadoc/com/bea/netuix/laf/PortalLookAndFeel.html
 
Thanks,
Venkata Sarvabatla

Saturday, May 8, 2010

Installation of Weblogic11g's Portal and Webcenter

What are the minimum of weblogic components required for the installation of Portal and Webcenter?


Weblogic Portal and WebCenter are totally 2 different Products.


Latest version of Weblogic Portal is 10.3.2 which can be installed from this bottom link. This installation do not need any prerequisite software. This installer will install JDK, Weblogic Server, Eclipse IDE and all Portal Framework Components. There is NO weblogic portal 11g

http://www.oracle.com/technology/software/products/wlp/index.html

If you mean Weblogic Server, then yes, we do have Weblogic Server 11g latest version that you can download

Coming to WebCenter Suite, it includes multiple components. Its a Suite. See bottom link to see what it includes (Expand small + icon next to the product name).

http://www.oracle.com/technology/software/products/middleware/htdocs/fmw_11_download.html

To run WebCenter applications, you do need Weblogic Server installed. This is the only dependency I am aware of. Ofcourse you need full version of latest JDeveloper that includes all WebCenter ADF modules.

As of now only in portal 10.3.2, if I am not wrong, you can consume WebCenter Portlets in Weblogic Portal using WSRP.

Thanks,
Venkata Sarvabatla

Thursday, May 6, 2010

Portals vs Desktop

Hi

Guessing you are familiar with Java Class and Objects (instances), I will give that analogy. Its not exactly same but concept wise it is same. Portal (.portal file) is like a Class file. Desktop(s) that you create from Portal Admin Tool are like Instances of this single .portal file. Note that each java object instance can have its own values for the instance variables. Same thing for each desktop can have its own set of Books/Pages/Portlets, look and feels etc.

.portal file is a single file that has all the Books, Pages, and Portlets on Pages along with some look and feel stuff. Now desktop is derived from this .portal file. Imagine we have a portal for a company that has HR Dept, Marketing Dept, Sales Dept. For this we can have single .portal file, with 3 Pages HR, Marketing, Sales. Now we can create 3 Desktops like HR Desktop, Marketing Desktop, and Sales Desktop. By default all these desktops will have 3 pages. But for HR Desktop you can remove 2 pages (Marketing and sales). For Marketing Desktop you can remove HR and Sales Page etc. So you will have different desktops for different deparments. But .portal file is the central main file having all the pages and portlets. You can achieve this using Entitlements also by setting proper entitlements for each Page and adding users to those Entitlement Roles. Just for explaination I gave above example.

When we access portal application from .portal file, it is rendered from .portal xml file. But when we create Desktop, .portal file is Parsed and all the stuff is stored in the Database like Books, Pages, Portlets information, Look and feel stuff etc etc.

Also we cannot set Entitlements to .portal file. We can set them only to Desktops. Ofcourse once we set to Desktops, it works for .portal file also. I have seen this. But in reality Entitlements gets applied only to Desktops.

Also, if you want End User to customize the Portal application, like they can add or remove Portlets, pages etc, they Cannot do this in .portal mode. They can do this only in Desktop mode. This is called Visitor Tools Customization. Just like in yahoo or google, we can edit and add/remove portlets, change look and feel etc.

Performance wise, Desktop will be little bit slow, speically if you allow end users to customize their Desktops. For each Customized Desktop, there will be chain of records in Portal tables starting from Desktop, Book, Pages, Portlet Tables. You can see multiple records in PF_Desktop_Instance table. There will be slight performance issue.

But it is always good to have Desktop and expose Desktop as the final url for any portal application. In this way, we can edit .portal file anytime like add new books/pages/portlets etc but Desktop will not be affected. When we are ready to move all these changes, then you can update Desktop with all new changes you made in .portal file.

Having multiple .portal files is not a good idea, unless they are totall different from business point of view like totally different areas/applications. Have one .portal file. Make use of Desktops. Also make use of Visitor Entitlements which are very powerful things from BEA. Using Entitements and without any coding involved, you can control what parts of Portal (Desktop) like Books/Pages/Portlets are visible to which set of Users (Roles, Groups etc).

So given a choice, go for Desktop mode only. Atleast one Desktoo should be fine.

You can fine more details in oracle docs on portal.

Using Multiple Desktops - http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portals/optimize.html#wp1001690

Managing Portal Desktops - http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/portals/creating_staging.html
 
Venkata Sarvabatla

Wednesday, April 28, 2010

USR file is cached somewhere in Portal Admin Console

If you target server is in production mode, it does not apply changes in the datasync file. You can easily update this by deleting the Datasync records in the portal database prior to deploying the new ear containing the changes to the .usr files.




Here is the SQL I run when ever I need to update user properties:



delete from DATA_SYNC_ITEM

where APPLICATION_ID = (

Select dsa.APPLICATION_ID from DATA_SYNC_APPLICATION dsa

where dsa.application_name ='+EAR_APP_NAME+')



Once you run the SQL above, deploy the new ear and your new properties will now appear in the Portal Admin Tool. Propagation is not worth the trouble to update user properties as it is SLOWER than MOLASSES.
 
you can go through the below links :
 
http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/prodOps/propToolAdvanced.html
 
http://download.oracle.com/docs/cd/E13218_01/wlp/docs81/prodOps/datasync.html

Friday, February 5, 2010

JSR 168 Portlets -- IPC with Custom Events not working in IE6

Description :

Widgets (Featured news,Email,Calender,Todo's,Metrics) not working when I go to detailed page and come back to the landing page .

We are using two portlets (Left portlet and Right portlets) for this ..Widgets are in Left Portlet and we are displaying contents in Right portlet.

Based on Widget selected(left portlet option selected) we are displaying the contents in right portlet.

Those two portlets are JSR618 (Java) portlets,Asynchronous mode =enabled and Interportlet Communication based on customevents

When we selected any option in left portlet it is firing the event in the right portlet based on that we are getting the contents and displaying the content.

This approach is working fine when we go to the landing page first time.

The problem is -- If I go to any secondery page and come back to the landing page and select any Widget (option) in the left portlet custom events are not working .

Observation and findings on this issue:
First time go to landing page put the curser on the widgets( left portlet options) I see in status bar http://localhost/intranet/appmanager/verizon/myportal.

When I go to next page come back and put the curser on the Widgets(options) I see in status bar "javascript:bea.wlp.disc.xie._service.update(http://localhost/intranet/appmanager/verizon/myportal?_nfpb=true&_nfxr=false&_pageLabel=intranetvz_portal_vso_page)"

the above java script is not working in IE6. I tested in IE8 It was working perfectly. This problem is related to IE6.

Please see the below link for more details(my posting in Oracle Weblogic portal forum)
http://forums.oracle.com/forums/thread.jspa?messageID=4078620#4078620

Friday, January 15, 2010

SSL handshake failure error while access webservice

Question "

I am trying to access webservice deployed in loadbalence envinorment we are getting the below error
"Certificate chain received from mynetworksit.ebiz.verizon.com - 113.134.232.24 was not trusted causing SSL handshake failure."

Any suggessions to solve this error

Answer"
you need to make sure your keys are all registered properly with WebLogic Server.

You need to update the certificate.

In my case, in my Laptop I am not getting this error in my project dev environment and UAT environment I am getting this error, What I did is I copied the certificate from Laptop to Dev ,UAT environment.

For more details go through the below link
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/secmanage/identity_trust.html