You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by insom <da...@gmail.com> on 2008/08/07 00:29:14 UTC

Turn off SWARM

Hi, I'm developing my first Wicket application and I'm using SWARM for
authentication. However, it's a pain to re-login every time I make a change
to the code. Is there a way I can turn SWARM off while developing?

Thanks much...
-- 
View this message in context: http://www.nabble.com/Turn-off-SWARM-tp18860819p18860819.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turn off SWARM

Posted by Brill Pappin <br...@pappin.ca>.
I'm not sure how Swarm works (I'm still using the simple auth-roles  
and have no need for anything more) but maybe you can use the same  
trick.
In my Application I simply check if I'm running in development mode,  
and switch out the normal authentication mechanism for a "fake" one  
that will always authenticate.

As things get more complex you may actually have to control that a bit  
(apps start to provide different functions based on who is logged in  
and what roles they have).

Swarm should be "fakeable" that way as well, although I can't tell you  
how it would be.

- Brill


On 6-Aug-08, at 6:29 PM, insom wrote:

>
> Hi, I'm developing my first Wicket application and I'm using SWARM for
> authentication. However, it's a pain to re-login every time I make a  
> change
> to the code. Is there a way I can turn SWARM off while developing?
>
> Thanks much...
> -- 
> View this message in context: http://www.nabble.com/Turn-off-SWARM-tp18860819p18860819.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turn off SWARM

Posted by Jason Anderson <xd...@maxexp.com>.
I've found that during development the combination of running mvn jetty:run
and using javarebel to automagically reload the newly compiled classes makes
for an extremely fast edit/compile/test cycle - much faster than even
letting jetty do the reloading

YMMV



On Thu, Aug 7, 2008 at 1:50 AM, Johan Compagner <jc...@gmail.com>wrote:

> then you should really look around so that you can use the hotcode/swap of
> the jvm
> Tomcat shouldnt rebuild/redeploy constantly on every change in development
> thats quite annoying if you ask me
>
> If you use eclipse and you want to use tomcat use the sysdeo plugin
> else just use jetty (see our quickstart)
>
> johan
>
>
> On Thu, Aug 7, 2008 at 1:20 AM, insom <da...@gmail.com> wrote:
>
> >
> >
> > Johan Compagner wrote:
> > >
> > > Why do you need to relogin?
> > >
> >
> > It happens whenever I change a Java file and rebuild. Even if I just
> change
> > one of the HTML files, Tomcat notices that and rebuilds. Then when I try
> to
> > navigate to a secure page in the application, I get redirected to the
> login
> > page.
> > --
> > View this message in context:
> > http://www.nabble.com/Turn-off-SWARM-tp18860819p18861491.html
> > Sent from the Wicket - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>

Re: Turn off SWARM

Posted by Johan Compagner <jc...@gmail.com>.
then you should really look around so that you can use the hotcode/swap of
the jvm
Tomcat shouldnt rebuild/redeploy constantly on every change in development
thats quite annoying if you ask me

If you use eclipse and you want to use tomcat use the sysdeo plugin
else just use jetty (see our quickstart)

johan


On Thu, Aug 7, 2008 at 1:20 AM, insom <da...@gmail.com> wrote:

>
>
> Johan Compagner wrote:
> >
> > Why do you need to relogin?
> >
>
> It happens whenever I change a Java file and rebuild. Even if I just change
> one of the HTML files, Tomcat notices that and rebuilds. Then when I try to
> navigate to a secure page in the application, I get redirected to the login
> page.
> --
> View this message in context:
> http://www.nabble.com/Turn-off-SWARM-tp18860819p18861491.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: Turn off SWARM

Posted by Brill Pappin <br...@pappin.ca>.
I like that, nice and clean.
you could use the:
if (Application.DEPLOYMENT.equals(getConfigurationType())) {}
as I do for auth-roles as well.

- Brill

On 6-Aug-08, at 7:42 PM, Igor Vaynberg wrote:

> just do something like this in your login page's constructor:
>
> if (system.getproperty("autologin")!=null) {
>  authenticate(system.getproperty("username"),  
> system.getproperty("password"));
>  throw new restartresponseexception(getapplication().gethomepage());
> }
>
> and launch your app with those system props defined.
>
> -igor
>
> On Wed, Aug 6, 2008 at 4:20 PM, insom <da...@gmail.com> wrote:
>>
>>
>> Johan Compagner wrote:
>>>
>>> Why do you need to relogin?
>>>
>>
>> It happens whenever I change a Java file and rebuild. Even if I  
>> just change
>> one of the HTML files, Tomcat notices that and rebuilds. Then when  
>> I try to
>> navigate to a secure page in the application, I get redirected to  
>> the login
>> page.
>> --
>> View this message in context: http://www.nabble.com/Turn-off-SWARM-tp18860819p18861491.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turn off SWARM

Posted by Igor Vaynberg <ig...@gmail.com>.
just do something like this in your login page's constructor:

if (system.getproperty("autologin")!=null) {
  authenticate(system.getproperty("username"), system.getproperty("password"));
  throw new restartresponseexception(getapplication().gethomepage());
}

and launch your app with those system props defined.

-igor

On Wed, Aug 6, 2008 at 4:20 PM, insom <da...@gmail.com> wrote:
>
>
> Johan Compagner wrote:
>>
>> Why do you need to relogin?
>>
>
> It happens whenever I change a Java file and rebuild. Even if I just change
> one of the HTML files, Tomcat notices that and rebuilds. Then when I try to
> navigate to a secure page in the application, I get redirected to the login
> page.
> --
> View this message in context: http://www.nabble.com/Turn-off-SWARM-tp18860819p18861491.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turn off SWARM

Posted by insom <da...@gmail.com>.

Johan Compagner wrote:
> 
> Why do you need to relogin?
> 

It happens whenever I change a Java file and rebuild. Even if I just change
one of the HTML files, Tomcat notices that and rebuilds. Then when I try to
navigate to a secure page in the application, I get redirected to the login
page.
-- 
View this message in context: http://www.nabble.com/Turn-off-SWARM-tp18860819p18861491.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Turn off SWARM

Posted by Johan Compagner <jc...@gmail.com>.
Why do you need to relogin?
First of all you can use hotswap as much a possible when developing/debugging.
And if that doesnt work, the code is changed to much, you can stop
your webcontainer nicely and restart it again (or redeploy the webapp)
so that your session is kept including your logon info.

On 8/7/08, insom <da...@gmail.com> wrote:
>
> Hi, I'm developing my first Wicket application and I'm using SWARM for
> authentication. However, it's a pain to re-login every time I make a change
> to the code. Is there a way I can turn SWARM off while developing?
>
> Thanks much...
> --
> View this message in context:
> http://www.nabble.com/Turn-off-SWARM-tp18860819p18860819.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org