cancel
Showing results for 
Search instead for 
Did you mean: 

How to handle IPortalComponent Session in Dynpage

chinna_babu2
Active Participant
0 Kudos

Hi Guys,

I am using IPortalComponentSession object to hold the bean instances. Evey thing is working, if page is not idle for more than 20 min. If I access the page when the page is idle for more than 20 min, it is throwing Null pointer exception. This is because IPortal

ComponentSession scope gets lost and couldn't get the bean object.

Is there any parameter available to set the Global Portal Sesssion time to IPortalComponent Session, such that when portal session expires IPortalComponent Session expires automatically.

Is there any property exists in portalapp.xml file or iview.

Thanks in Advance

Chinna.

Accepted Solutions (0)

Answers (5)

Answers (5)

chinna_babu2
Active Participant
0 Kudos

Where evern IPortalComponent session is being used, I am catching Null pointer exception and reloading the whole page again.

Former Member
0 Kudos

Hi,

try setting the property in portalapp.xml

<property name="com.sap.portal.page.PageTimeout" value="800000" />

Regards,

srikanth

chinna_babu2
Active Participant
0 Kudos

Hi Srikanth,

I belive this property will keep the page request timeout to 800000 Milliseconds.

Do we have any similar kind of property to set the component session time out in portalapp.xml?

Thanks

Chinna

Former Member
0 Kudos

Hi,

I think there is a much more simple way.

From

HttpSession ssn = IPortalComponentSession.getHttpSession();

ssn.setMaxInactiveInterval(int);

Regards

Srini

chinna_babu2
Active Participant
0 Kudos

Hi Srini,

I don't want to share the data between through out the portal. Hence I am using IPortalComponent session to carry the beans. I didn't find any property to set the max inactive interval for component session.

Thanks

Chinna.

Former Member
0 Kudos

HI,

I think IPortalComponentSession is just a wrapper for the native Java HttpSession, pl try my above code.

Srini

chinna_babu2
Active Participant
0 Kudos

Hi Srini,

If I use HttpSession, it will share the bean reference throughout the portal. I want to share the bean reference to within the component itself.

Thanks

Chinna.

chinna_babu2
Active Participant
0 Kudos

Hi All,

As I said, when ever the component session expires Null pointer exception is showing. Hence I am catching the NullPointer exception and then reloading the page again. It is working in frontend without any issues.

But in the error log monitor(nwa) I can see the below error when reloading the page after component session expires.

Cannot change transaction isolation during distributed transaction and when the connection is shared. DataSource name: "PRODB2

As per my knowledge I understood that this is happening beacuse application is trying to recreate a new connection pool while one pool instance is alive.

If this is correct can any one tell me how to destory the pool of current session when reloading the page.

Thanks in Advance,

Chinna.

Former Member
0 Kudos
chinna_babu2
Active Participant
0 Kudos

Hi Srini,

I am developing components using JSPDynpages. Where can I find web.xml file, instead we have portalapp.xml file where we do configurations.

But I do not find any propery to set the portal component session timeout in this file.

Thanks

Chinna

chinna_babu2
Active Participant
0 Kudos

Hi All,

Has any one encountered this kind of error??

Please share your experience regarding this to help me in fixing the problem.

Thanks

Chinna.

Former Member
0 Kudos

This message was moderated.