Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Riena Security - Session is null at some calls
Riena Security - Session is null at some calls [message #643497] Tue, 07 December 2010 06:54 Go to next message
Eclipse UserFriend
Originally posted by: matthiasrodler.gmx.net

Hi,

I'm using Riena Security and I'm currently facing the problem, that at
some calls I get a null value from the SessionHolder within the
SecurityCallHook.

The problem will occur at every service call within a
org.eclipse.core.runtime.jobs.Job class (in the run method) but I'm not
sure if this is the reason (but it seems so).

At any further calls - outside a job - the session is set again.

Matthias
Re: Riena Security - Session is null at some calls [message #644102 is a reply to message #643497] Thu, 09 December 2010 13:33 Go to previous messageGo to next message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
Hi Matthias,

the session in the SessionHolder is a singleton on the client. So no matter what thread you are in, it should always be
available once you have logged in successfully.

Maybe it helps to set break points in SimpleSessionHolder class in setHolder and getHolder to see whats going on in your
environment. It should certainly work.

christian

Am 07.12.10 07:54, schrieb Matthias Rodler:
> Hi,
>
> I'm using Riena Security and I'm currently facing the problem, that at
> some calls I get a null value from the SessionHolder within the
> SecurityCallHook.
>
> The problem will occur at every service call within a
> org.eclipse.core.runtime.jobs.Job class (in the run method) but I'm not
> sure if this is the reason (but it seems so).
>
> At any further calls - outside a job - the session is set again.
>
> Matthias
>
Re: Riena Security - Session is null at some calls [message #644534 is a reply to message #644102] Mon, 13 December 2010 06:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: matthiasrodler.gmx.net

The reason for a null pointer is the usage of the help system from
eclipse and with this your way how you decide between client and server
mode.

The help system needs several packages which start with
"org.eclipse.equinox.http" for which you are looking for in the
ContainerModel class. This leads to the usage of
SimpleThreadedSessionHolder which will create a new SessionHolder if it
is called within an eclipse job.

I just have missed your "SERVER Mode" message and was not aware about
the impact the mode decision has on the application.

Maybe a "server" bundle could be used instead of looking at the bundle
names.

Matthias

Am 09.12.2010 14:33, schrieb Christian Campo:
> Hi Matthias,
>
> the session in the SessionHolder is a singleton on the client. So no
> matter what thread you are in, it should always be available once you
> have logged in successfully.
>
> Maybe it helps to set break points in SimpleSessionHolder class in
> setHolder and getHolder to see whats going on in your environment. It
> should certainly work.
>
> christian
>
> Am 07.12.10 07:54, schrieb Matthias Rodler:
>> Hi,
>>
>> I'm using Riena Security and I'm currently facing the problem, that at
>> some calls I get a null value from the SessionHolder within the
>> SecurityCallHook.
>>
>> The problem will occur at every service call within a
>> org.eclipse.core.runtime.jobs.Job class (in the run method) but I'm not
>> sure if this is the reason (but it seems so).
>>
>> At any further calls - outside a job - the session is set again.
>>
>> Matthias
>>
>
Re: Riena Security - Session is null at some calls [message #644548 is a reply to message #644534] Mon, 13 December 2010 08:38 Go to previous messageGo to next message
Stefan Liebig is currently offline Stefan LiebigFriend
Messages: 124
Registered: July 2009
Senior Member
Hi Matthias,

That´s right. It is not a very save way for deciding whether we are on
the server or the client. But it is the fallback if the system property
"riena.container.type" is not set.
==> http://wiki.eclipse.org/Riena_System_Properties

Tschüß,
Stefan

Am 13.12.2010 07:36, schrieb Matthias Rodler:
> The reason for a null pointer is the usage of the help system from
> eclipse and with this your way how you decide between client and server
> mode.
>
> The help system needs several packages which start with
> "org.eclipse.equinox.http" for which you are looking for in the
> ContainerModel class. This leads to the usage of
> SimpleThreadedSessionHolder which will create a new SessionHolder if it
> is called within an eclipse job.
>
> I just have missed your "SERVER Mode" message and was not aware about
> the impact the mode decision has on the application.
>
> Maybe a "server" bundle could be used instead of looking at the bundle
> names.
>
> Matthias
>
> Am 09.12.2010 14:33, schrieb Christian Campo:
>> Hi Matthias,
>>
>> the session in the SessionHolder is a singleton on the client. So no
>> matter what thread you are in, it should always be available once you
>> have logged in successfully.
>>
>> Maybe it helps to set break points in SimpleSessionHolder class in
>> setHolder and getHolder to see whats going on in your environment. It
>> should certainly work.
>>
>> christian
>>
>> Am 07.12.10 07:54, schrieb Matthias Rodler:
>>> Hi,
>>>
>>> I'm using Riena Security and I'm currently facing the problem, that at
>>> some calls I get a null value from the SessionHolder within the
>>> SecurityCallHook.
>>>
>>> The problem will occur at every service call within a
>>> org.eclipse.core.runtime.jobs.Job class (in the run method) but I'm not
>>> sure if this is the reason (but it seems so).
>>>
>>> At any further calls - outside a job - the session is set again.
>>>
>>> Matthias
>>>
>>
>
Re: Riena Security - Session is null at some calls [message #644580 is a reply to message #644548] Mon, 13 December 2010 10:52 Go to previous message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
Registered: July 2009
Senior Member
I have added the use case of Security to the wiki page for the riena.container.type system property.....

christian

Am 13.12.10 09:38, schrieb Stefan Liebig:
> Hi Matthias,
>
> That´s right. It is not a very save way for deciding whether we are on
> the server or the client. But it is the fallback if the system property
> "riena.container.type" is not set.
> ==> http://wiki.eclipse.org/Riena_System_Properties
>
> Tschüß,
> Stefan
>
> Am 13.12.2010 07:36, schrieb Matthias Rodler:
>> The reason for a null pointer is the usage of the help system from
>> eclipse and with this your way how you decide between client and server
>> mode.
>>
>> The help system needs several packages which start with
>> "org.eclipse.equinox.http" for which you are looking for in the
>> ContainerModel class. This leads to the usage of
>> SimpleThreadedSessionHolder which will create a new SessionHolder if it
>> is called within an eclipse job.
>>
>> I just have missed your "SERVER Mode" message and was not aware about
>> the impact the mode decision has on the application.
>>
>> Maybe a "server" bundle could be used instead of looking at the bundle
>> names.
>>
>> Matthias
>>
>> Am 09.12.2010 14:33, schrieb Christian Campo:
>>> Hi Matthias,
>>>
>>> the session in the SessionHolder is a singleton on the client. So no
>>> matter what thread you are in, it should always be available once you
>>> have logged in successfully.
>>>
>>> Maybe it helps to set break points in SimpleSessionHolder class in
>>> setHolder and getHolder to see whats going on in your environment. It
>>> should certainly work.
>>>
>>> christian
>>>
>>> Am 07.12.10 07:54, schrieb Matthias Rodler:
>>>> Hi,
>>>>
>>>> I'm using Riena Security and I'm currently facing the problem, that at
>>>> some calls I get a null value from the SessionHolder within the
>>>> SecurityCallHook.
>>>>
>>>> The problem will occur at every service call within a
>>>> org.eclipse.core.runtime.jobs.Job class (in the run method) but I'm not
>>>> sure if this is the reason (but it seems so).
>>>>
>>>> At any further calls - outside a job - the session is set again.
>>>>
>>>> Matthias
>>>>
>>>
>>
>
Previous Topic:Riena Remote Services OSGi EE compliant using ECF
Next Topic:How to implement Remote Observer Pattern with Riena?
Goto Forum:
  


Current Time: Thu Apr 25 10:11:20 GMT 2024

Powered by FUDForum. Page generated in 0.04615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top