You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Ryan McKinley <ry...@gmail.com> on 2009/03/24 23:17:28 UTC

Wicket+Ki / Enable "Enterprise Sessions"

Hi-

I'm trying to put together a working example or Wicket + Ki working  
together.  (and learning Ki along the way).  I started with:  http://code.google.com/p/wicket-jsecurity/ 
   and am trying to get something running.  I hope to have a few  
examples that "just works" when you type:
  mvn jetty:run

I went ahead and added this to wicketstuff, but will happily move/ 
rename/whatever depending on what other folks think is appropriate.   
Check:
  https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/ki-security

This has a core reusable module, and then some example projects:
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/ki-security/ki-security-examples/

When I run the example, I get:

"If you're seeing this exception, ensure you have configured JSecurity  
to use Enterprise Sessions and not..."

Any pointers on what that means?  How would I do that?

thanks for any pointers!

ryan

Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Les Hazlewood <lh...@apache.org>.
Cool, thanks for the pointers.  I'm an Idea user so mvn idea:idea should
work as well.  I'll give it a try.

On Sat, Mar 28, 2009 at 3:42 PM, Ryan McKinley <ry...@gmail.com> wrote:

>
> On Mar 28, 2009, at 2:53 PM, Les Hazlewood wrote:
>
> Hi Ryan,
>
> I'm about to respond to your emails, but wanted to quickly ask if there was
> a way that I could get committer access to the wicketstuff repository so
> that I might help out with source code.
>
> I'd like to remove the google code wicketstuff-jsecurity project if you're
> moving it in to wicketstuff's proper repo.
>
>
> I wanted to add some quick notes to the wicketstuff wiki, but it appears to
> be down now
> http://wicketstuff.org/confluence/
> (I think they are upgrading/changing servers)
>
> Anyway, to run the examples you will need to:
>
> svn co
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core
> cd wicketstuff-core/ki-security/
> mvn clean install
> cd ki-security-examples/ki-security-example-realm/
>
> mvn jetty:run
>
> That should start a demo webapp.
>
> also, if you are using eclipse, you can build a project with:
>
> mvn eclipse:eclipse
>
> from the ki-security directory.
>
> - - - - - - -
>
> I'll post this on a wiki when it is back up
>
> ryan
>
>
>
> Lemme know if this would be ok.
>
> Thanks!
>
> Les
>
> On Wed, Mar 25, 2009 at 11:59 AM, Ryan McKinley <ry...@gmail.com> wrote:
>
>>
>> Note that all of the PageStore and PageCache stuff is really only
>> necessary when using distributed sessions that might live in a distributed
>> cache:
>>
>>
>> Thanks -- simply commenting out:
>>
>> protected ISessionStore newSessionStore()
>> // {
>> // return new SecondLevelCacheSessionStore(this, new
>> SessionPageStore(100));
>> // }
>>
>> We can add that back when we have a sample configured for distributed
>> sessions...
>>
>> thanks again
>> ryan
>>
>
>
>

Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Ryan McKinley <ry...@gmail.com>.
On Mar 28, 2009, at 2:53 PM, Les Hazlewood wrote:

> Hi Ryan,
>
> I'm about to respond to your emails, but wanted to quickly ask if  
> there was a way that I could get committer access to the wicketstuff  
> repository so that I might help out with source code.
>
> I'd like to remove the google code wicketstuff-jsecurity project if  
> you're moving it in to wicketstuff's proper repo.
>

I wanted to add some quick notes to the wicketstuff wiki, but it  
appears to be down now
http://wicketstuff.org/confluence/
(I think they are upgrading/changing servers)

Anyway, to run the examples you will need to:

svn co https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core
cd wicketstuff-core/ki-security/
mvn clean install
cd ki-security-examples/ki-security-example-realm/

mvn jetty:run

That should start a demo webapp.

also, if you are using eclipse, you can build a project with:

mvn eclipse:eclipse

from the ki-security directory.

- - - - - - -

I'll post this on a wiki when it is back up

ryan



> Lemme know if this would be ok.
>
> Thanks!
>
> Les
>
> On Wed, Mar 25, 2009 at 11:59 AM, Ryan McKinley <ry...@gmail.com>  
> wrote:
>>
>> Note that all of the PageStore and PageCache stuff is really only  
>> necessary when using distributed sessions that might live in a  
>> distributed cache:
>>
>
> Thanks -- simply commenting out:
>
> protected ISessionStore newSessionStore()
> //	{
> //		return new SecondLevelCacheSessionStore(this, new  
> SessionPageStore(100));
> //	}
>
> We can add that back when we have a sample configured for  
> distributed sessions...
>
> thanks again
> ryan
>


Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Ryan McKinley <ry...@gmail.com>.
Great! thanks


On Mar 28, 2009, at 2:53 PM, Les Hazlewood wrote:

> Hi Ryan,
>
> I'm about to respond to your emails, but wanted to quickly ask if  
> there was a way that I could get committer access to the wicketstuff  
> repository so that I might help out with source code.


Yes, just email dev@wicket.apache.org with your sf username and  
someone will grant you access...  usually pretty quick.

http://www.nabble.com/forum/Search.jtp?forum=13977&local=y&query=commit+access


>
> I'd like to remove the google code wicketstuff-jsecurity project if  
> you're moving it in to wicketstuff's proper repo.
>

Excellent, i think that is the best path forward.


ryan


> Lemme know if this would be ok.
>
> Thanks!
>
> Les
>
> On Wed, Mar 25, 2009 at 11:59 AM, Ryan McKinley <ry...@gmail.com>  
> wrote:
>>
>> Note that all of the PageStore and PageCache stuff is really only  
>> necessary when using distributed sessions that might live in a  
>> distributed cache:
>>
>
> Thanks -- simply commenting out:
>
> protected ISessionStore newSessionStore()
> //	{
> //		return new SecondLevelCacheSessionStore(this, new  
> SessionPageStore(100));
> //	}
>
> We can add that back when we have a sample configured for  
> distributed sessions...
>
> thanks again
> ryan
>


Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Les Hazlewood <lh...@apache.org>.
Hi Ryan,

I'm about to respond to your emails, but wanted to quickly ask if there was
a way that I could get committer access to the wicketstuff repository so
that I might help out with source code.

I'd like to remove the google code wicketstuff-jsecurity project if you're
moving it in to wicketstuff's proper repo.

Lemme know if this would be ok.

Thanks!

Les

On Wed, Mar 25, 2009 at 11:59 AM, Ryan McKinley <ry...@gmail.com> wrote:

>
> Note that all of the PageStore and PageCache stuff is really only necessary
> when using distributed sessions that might live in a distributed cache:
>
>
> Thanks -- simply commenting out:
>
> protected ISessionStore newSessionStore()
> // {
> // return new SecondLevelCacheSessionStore(this, new
> SessionPageStore(100));
> // }
>
> We can add that back when we have a sample configured for distributed
> sessions...
>
> thanks again
> ryan
>

Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Ryan McKinley <ry...@gmail.com>.
>
> Note that all of the PageStore and PageCache stuff is really only  
> necessary when using distributed sessions that might live in a  
> distributed cache:
>

Thanks -- simply commenting out:

protected ISessionStore newSessionStore()
//	{
//		return new SecondLevelCacheSessionStore(this, new  
SessionPageStore(100));
//	}

We can add that back when we have a sample configured for distributed  
sessions...

thanks again
ryan

Re: Wicket+Ki / Enable "Enterprise Sessions"

Posted by Les Hazlewood <lh...@apache.org>.
Hi Ryan,

This is great!  The wicket-jsecurity google code project was just a
placeholder/sandbox to try out integration.  I am actually using it in one
of my apps at work and it is working pretty well, but I would definitely
call it 'beta'.

I'm happy to see it moving into wicket-stuff proper.  That was sort of our
intention really - to try it out on google code, and once we were happy, to
move it to wicket-stuff at a later date.  It's nice to see you taking that
on :)

The exception message you're seen is related to Ki's session management.

It currently has two modes: 'http' (default) and 'ki' **, which is used for
Enterprise Sessions.  'http' just uses the Servlet container's HttpSession
for session operations.  'ki' ** is used when you want to use Ki's
Enterprise Session Management which is a ground-up implementation of a
Session Manager that will work both in and outside of a web container.

When using this mode, The HttpServletRequest and HttpSession are just thin
wrappers around Ki's session management mechanisms, bypassing the servlet
container entirely.  This allows Ki to sit on top of a distributed
enterprise cache for session clustering instead of using container-specific
clustering configuration.

Note that all of the PageStore and PageCache stuff is really only necessary
when using distributed sessions that might live in a distributed cache:

The existing implementations used by Wicket at runtime expect an
HttpServletRequest to be bound to the thread at runtime when acquiring
Serialized Page instances.  Because Ki sessions can reside outside the
webcontainer, the PageStore/PageCache implementations cannot expect a
ServletRequest to be present, and so the implementations take the
appropriate steps to make sure that they are 1) very performant and 2) do
not require a web environment.

Regards,

Les

** The existing released project .jars (0.9.0 final), the enterprise session
mode is 'jsecurity'.  Current project SVN has that as 'ki'.

On Tue, Mar 24, 2009 at 6:17 PM, Ryan McKinley <ry...@gmail.com> wrote:

> Hi-
> I'm trying to put together a working example or Wicket + Ki working
> together.  (and learning Ki along the way).  I started with:
> http://code.google.com/p/wicket-jsecurity/  and am trying to get something
> running.  I hope to have a few examples that "just works" when you type:
>  mvn jetty:run
>
> I went ahead and added this to wicketstuff, but will happily
> move/rename/whatever depending on what other folks think is appropriate.
>  Check:
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/ki-security
>
> This has a core reusable module, and then some example projects:
>
> https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/ki-security/ki-security-examples/
>
> When I run the example, I get:
>
> "If you're seeing this exception, ensure you have configured JSecurity to
> use Enterprise Sessions and not..."
>
> Any pointers on what that means?  How would I do that?
>
> thanks for any pointers!
>
> ryan
>