Re: [Rife-users] complete self contained db-based user authorizaton example?

2006-12-04 Thread Fred Baube
> Does anyone have a minimal self-contained DB-based authorization web  
> app example they could share...?

I agree.  This would be a tremendous help.


fred b 

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Rife integration with JCR

2006-10-17 Thread Fred Baube
Is anyone (else) using JCR (e.g. Apache Jackrabbit) with Rife ?

I'm not sure that there is the same potential for tight integration with 
Rife as there is for relational DBs, but I'll know more before long.


fred b

-- 
F.Baube*  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Startup error in Gate.java

2006-10-01 Thread Fred Baube
> if you're getting that with the RIFE classloader disabled, the  
> culprit must be something else. I would try putting Log4J and 
> similar general purpose libraries in the common/endorsed Tomcat 
> directory and see if that changes something. 

I have done so, and it seems to have helped.

I guess it boils down to, define "general purpose libraries" ... 

> Also, make sure you have no other jars in your system-wide 
> classpath or Tomcat classpath that could cause conflicts 
> (same lib, other version for instance).

 and sorting out things like XML processing libraries
has been a nightmare thruout the life of my project  :-O


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] site.xml.path

2006-10-01 Thread Fred Baube
> The easiest way (and also the way that most people use) is by simply  
> starting the site in the repository participants:
> http://rifers.org:8088/browse/rifers/rife-jumpstart/branches/jdk15/ 
> src/rep/participants.xml?r=2923

Rightio !  This is working fine now !

> I'm wondering though, didn't you have a working application before  
> without errors? What did you change right before it stopped working?

A version without the ParticipantSite entry snuck into version control
bcos it worked ... just well enough to evade detection ...  :-O


fred b

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Placement of config parms

2006-09-29 Thread Fred Baube
When setting up configuration parameters, one can of course place 
them in the environment but it can be handier (ease, clarity) to do 
it in XML.  Likely places are  elements in rep/config.xml OR 
 elements in rep/participants.xml.  Do people have a pref-
erence between these ?  What are the practical considerations ? 


fred

-- 
F.Baube* "For as long as I have tried 
Georgetown/MSFS/1988   *  And as low as I can be, 
fbaube#saunalahti.fi   *  I will never resign myself 
 gsm  +358 41 536 8192 *  from the trial I seek"
 wmd   60°11'10.8"N 24°57'36.9"E * -- Beth, Portishead 

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] site.xml.path

2006-09-29 Thread Fred Baube
I'm reviewing my Rife configuration, and it seems
possible that my main site file (in sites/ ) is 
not explicitly pointed to by anything else (e.g. 
rep/config.xml, rep/participants.xml).

So what may be happening is that various default
behavior is being triggered but that sometimes
it barfs. 

So, let me ask: from where SHOULD my main sites 
file be referenced ? 


Beyond that, I can also try explicitly setting 
site.xml.path before the exception is triggered.


fred b

-- 
F.Baube* "For as long as I have tried 
Georgetown/MSFS/1988   *  And as low as I can be, 
fbaube#saunalahti.fi   *  I will never resign myself 
 gsm  +358 41 536 8192 *  from the trial I seek"
 wmd   60°11'10.8"N 24°57'36.9"E * -- Beth, Portishead 

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Startup error in Gate.java

2006-09-28 Thread Fred Baube
> Are you sure you have a site that is setup through your participants? 

Do you mean, the site is configured in XML and not on-the-fly ?
Yes, that is the case.

I tried a new Tomcat installation, and now I'm getting a new
weird exception, with Rife's classloader disabled.  This is
one example of the weird things that I have been getting.  

fred


Sep 29, 2006 12:09:27 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter RIFE
java.lang.RuntimeException: java.lang.LinkageError: Class 
org/apache/log4j/spi/LoggerRepository violates loader constraints
at 
com.uwyn.rife.rep.BlockingRepository.detectParticipantException(BlockingRepository.java:703)
at 
com.uwyn.rife.rep.BlockingRepository.runParticipants(BlockingRepository.java:679)
at com.uwyn.rife.rep.BlockingRepository.initialize(BlockingRepository.java:793)
at com.uwyn.rife.servlet.RifeLifecycle.init(RifeLifecycle.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.uwyn.rife.servlet.RifeFilter.init(RifeFilter.java:71)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
[..]

Caused by: java.lang.LinkageError: Class org/apache/log4j/spi/LoggerRepository 
violates loader constraints
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at 
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1815)
at 
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:869)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1322)
at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at org.apache.log4j.Category.addAppender(Category.java:152)
at 
org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:605)
at 
org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524)
at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408)
at 
org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
at 
org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
at org.apache.log4j.LogManager.(LogManager.java:113)
at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:64)
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:94)
at 
org.apache.jackrabbit.core.TransientRepository.(TransientRepository.java:55)
at wa.rep.MdcJcrTester.initialize(MdcJcrTester.java:97)
at com.uwyn.rife.rep.BlockingParticipant.run(BlockingParticipant.java:252)
... 1 more

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Startup error in Gate.java

2006-09-28 Thread Fred Baube
I'm getting consistent patterns of errors.

When I disable Rife's classloader, in web.xml:


engineclassloader.enabled
false


... then I get the error I posted before:

java.lang.Exception
The required init parameter 'site.xml.path' is not provided.

at com.uwyn.rife.engine.Gate obtainSite ( Gate.java : 204 )
at com.uwyn.rife.engine.Gate handleRequest ( Gate.java : 292 )
at sun.reflect.NativeMethodAccessorImpl invoke0 ( 
NativeMethodAccessorImpl.java )
at sun.reflect.NativeMethodAccessorImpl invoke ( 
NativeMethodAccessorImpl.java : 39 )
at sun.reflect.DelegatingMethodAccessorImpl invoke ( 
DelegatingMethodAccessorImpl.java : 25 )
at java.lang.reflect.Method invoke ( Method.java : 585 )
at com.uwyn.rife.servlet.RifeFilter doFilter ( RifeFilter.java : 142 )
[..]

When I re-enable the classloader, the above error does not occur 
 but I get a variety of other very strange errors, paricularly in 
code for Apache Jackrabbit (JCR-170) code and for log4j.

Baffling.


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Startup error in Gate.java

2006-09-28 Thread Fred Baube
When I install my servlet into Tomcat I'm getting 
an odd error, with Rife 1.5.1 (jdk 1.5).

Any thoughts on how to debug this ?  Ordinarily,
where is this parameter set ? 


fred b 


java.lang.Exception

The required init parameter 'site.xml.path' is not provided.

at com.uwyn.rife.engine.Gate obtainSite ( Gate.java : 204 )
at com.uwyn.rife.engine.Gate handleRequest ( Gate.java : 292 )
at sun.reflect.NativeMethodAccessorImpl invoke0 ( NativeMethodAccessorImpl.java 
)
at sun.reflect.NativeMethodAccessorImpl invoke ( NativeMethodAccessorImpl.java 
: 39 )
at sun.reflect.DelegatingMethodAccessorImpl invoke ( 
DelegatingMethodAccessorImpl.java : 25 )
at java.lang.reflect.Method invoke ( Method.java : 585 )
at com.uwyn.rife.servlet.RifeFilter doFilter ( RifeFilter.java : 142 )
at org.apache.catalina.core.ApplicationFilterChain internalDoFilter ( 
ApplicationFilterChain.java : 202 )
at org.apache.catalina.core.ApplicationFilterChain doFilter ( 
ApplicationFilterChain.java : 173 )
at org.apache.catalina.core.StandardWrapperValve invoke ( 
StandardWrapperValve.java : 213 )
at org.apache.catalina.core.StandardContextValve invoke ( 
StandardContextValve.java : 178 )
at org.apache.catalina.core.StandardHostValve invoke ( StandardHostValve.java : 
126 )
at org.apache.catalina.valves.ErrorReportValve invoke ( ErrorReportValve.java : 
105 )
at org.apache.catalina.core.StandardEngineValve invoke ( 
StandardEngineValve.java : 107 )
at org.apache.catalina.connector.CoyoteAdapter service ( CoyoteAdapter.java : 
148 )
at org.apache.coyote.http11.Http11Processor process ( Http11Processor.java : 
868 )
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler 
processConnection ( Http11BaseProtocol.java : 663 )

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] CodeZoo

2006-09-19 Thread Fred Baube
Yikes, the ORA CodeZoo page is way out of date:
http://www.codezoo.com/pub/component/3195

fred b

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: SV: [Rife-users] *MetaData classes and inheritance

2006-09-18 Thread Fred Baube
I think I should have phrased my question as: 

If class FooBar extends class Foo, then

when Rife merges  FooBarMetaData into FooBar,
does Rife also merge FooMetaData into FooBar,
 and does Rife also merge FooMetaData.activateMetaData()
into FooBarMetaData.activateMetaData() ? 

And apparently the answer is: no, it does neither. 


thx!

fred B


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] *MetaData classes and inheritance

2006-09-18 Thread Fred Baube
Hi all,

I'm finally separating my metadata into separate classes. 
I'm wondering how method overrides work with this mechanism, 
and what the best practice is. 

My classes are in an inheritance hierarchy, and constraints 
are set at several levels.

If I have class FooBar extends class Foo, ...

* Should FooBarMetaData extend MetaData or FooMetaData ?
  I assume, FooMetaData ?

* FooBarMetaData.activateMetaData() needs (somehow) to call
 FooMetaData.activateMetaData(), yes ? 

* ... but this is done for me if FooBarMetaData extends FooMetaData ?
  Or do I have to _explicitly_ call super.activateMetaData() ? 

Sorry if these are noobieish, but I hesitate to assume anything
when there is powerful classloader hacking going on ...


thx!

fred

-- 
F.Baube  
fbaube#saunalahti.fi 
wmd   60°11'10.8"N 24°57'36.9"E

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Exceptions in Participants

2006-09-04 Thread Fred Baube
I have a class that executes at startup, and extends BlockingParticipant.
In it, there's a couple of types of exception that I can't seem to catch, 
even when I am specific about the type.

catch (com.uwyn.rife.database.exceptions.ExecutionErrorException e) {..}
catch 
(com.uwyn.rife.database.exceptions.PreparedStatementCreationErrorException e) 
{..]

It simply fails to catch these, and instead the servlet dies on startup.


Is this expected behavior ?


fred

-- 
F.Baube* "The world's a mess,
Georgetown/MSFS/1988   *  it's in my kiss."
fbaube#saunalahti.fi   *  -- X, "Beyond and Back"
 gsm  +358 41 536 8192 * 
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] metadata and constraints question

2006-09-02 Thread Fred Baube
> Next is for me to get a RIFE bumper sticker..
> Or how about a T-shirt that says "Got RIFE?" ;-)

It's mildly politically incorrect, but ...


=>  "Get a Rife !"


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] metadata and constraints question

2006-09-02 Thread Fred Baube
> I'm digging deeper into RIFE, and the joy just keeps increasing :-)


Now THAT'S an ENDORSEMENT !


:)   fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Foreign keys

2006-08-26 Thread Fred Baube
I haven't used foreign keys previously, but I'd like to now.

Brings many questions, some of them quite probably rather stupid ...


 If I want to use the method GenericQueryManager.install(),
is is possible to specify foreign key constraints using 
calls to addConstraint (new ConstrainedProperty(..)), or 
do I need to create tables manually using CreateTable ? 

What is a CreateTable.ViolationAction ?

The method CreateTable.foreignKey(..) has eight different 
signatures.  The argument "localParameter" obviously names 
the column in "this" table, so what is the meaning of the 
argument "name" ?


If referential integrity is violated at runtime, does Rife
give me a specialised exception, or do I get the DB's own 
exception, unmodified ? 

Is there a way to check for a possible violation of referential 
 integrity before I actually try to execute a DB operation ? 


And, what do DatabaseSessions give me ? 



thanks...!

fred

--
F.Baube* "The world's a mess,
Georgetown/MSFS/1988   *  it's in my kiss."
fbaube#saunalahti.fi   *  -- X, "Beyond and Back"
 gsm  +358 41 536 8192 * 
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Fisheye?

2006-08-24 Thread Fred Baube
I see that Rifers.org is using Fisheye 
 (at  http://rifers.org:8088/viewrep/rifers  )

How is it ?  Worth setting up ?


fred

-- 
F.Baube* Only to breathe
Georgetown/MSFS/1988   * Only to see
fbaube#saunalahti.fi   * That space and light 
 gsm  +358 41 536 8192 *   is what I really need
 wmd   60°11'10.8"N 24°57'36.9"E * (Berenyi / Anderson) 
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] [ANN] JavaPaste 1.0 released : pastebin with highlighting, diffing, private pastebins and image uploads

2006-07-13 Thread Fred Baube
Sorry to sound like a complete twit, but ...

> JavaPaste is a Java-oriented pastebin 

What is a pastebin ?


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] JBI?

2006-07-11 Thread Fred Baube
Is anyone else tinkering with JBI ?  I'm considering integrating
it with my Rife app to get both web services and good external
multiprotocol connectivity. 

Apache ServiceMix is an (AFICT) nice open source implementation of 
the JBI ESB (Enterprise Service Bus).  The internal architecture is 
message-based, for loose coupling among components.  

The internal message bus handles normalised XML messages, thus the ESB 
is also known as a "Normalized Message Router".  "Service Units" plug 
into this bus to provide services, and "Binding Connectors" plug into 
the bus to do message and protocol translation to external connections. 

There are some shortcuts provided so that you can put thin wrappers 
around POJOs and then use them as Service Units. 

AFAICT it's a short, effective path to getting web services up and 
running.  Plus there's BCs for email, http (incl. an http invoker), 
ftp, jms,jca, rss, jabber, file systems, saaj, and more. 


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] GWT?

2006-07-11 Thread Fred Baube
> long time no mail!

been busy consulting ... 

> I briefly looked at GWT and it's indeed impressive. It doesn't seem  
> possible to integrate it easily with server-side frameworks though.  
> Many parts of GWT are not even open-source, so it's difficult to hack.
> It would be nice to be able to pull it off though!

IIRC the runtime and the compiler are closed-source but liberally licensed.
and there's people devoting a lot to time to widget cookery. 

> TinyMCE works great with RIFE indeed, I integrate it more and more.

How about a wiki page  ;-)

I got my Rife servlet to accept a TinyMCE submission pretty easily,
but then I had to go work on other stuff.  OTOH Bitflux BXE, Xopus, 
and Mozile were mainly headaches in integration, so TinyMCE was a 
clear winner.  But Mozile (0.8) is making good progress on editing 
per generalised RNG schemas, so it is showing some promise. 


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] GWT?

2006-07-10 Thread Fred Baube
Has anyone tried integrating GWT into a Rife app ?

I ask because there is now -- ta-da! -- a rich text editor 
add-on widget for GWT !  Open source, Apache license. 

demo:
http://gwtaddons.sourceforge.net/sample/RichTextSample.html

API:
http://gwtaddons.sourceforge.net/doc/net/sourceforge/gwtaddons/client/richtext/Editor.htm

home page:
http://google.wikia.com/wiki/Google_Web_Toolkit


I'll admit that I haven't tried Rife's new Ajax framework, 
and that TinyMCE does integrate with Rife pretty easily. But 
the thought of doing everything in Java is VERY attractive. 


fred

-- 
F.Baube* Only to breathe
Georgetown/MSFS/1988   * Only to see
fbaube#saunalahti.fi   * That space and light 
 gsm  +358 41 536 8192 *   is what I really need
 wmd   60°11'10.8"N 24°57'36.9"E * (Berenyi / Anderson) 
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] array/multiple beans from form submission

2006-05-29 Thread Fred Baube
Quoting Geert Bevin:
>
> >>Hmm that shouldn't be too hard to add.
> >>Maybe you could take a crack at it ;-)
> >
> >Then there really _would_ be bidirectional templates !
> >
> >And there's plenty of Javascript "out there" for clicking
> >to add a new row to a table.  Then table/list editing could
> >be done 100% locally before POST'ing it.
> 
> Not really sure I'm following you :-/

It's always possible that I'm full of balonie  :)

> How does Javascript fit in this picture, or how does this interact  
> with bidirectionality?

Rife Forms are truly bidirectional, and can use HTML field validation too.

Rife also makes it easy to append to Value tags, in order to generate HTML 
tables with N rows.  

But is it possible to generate a Form with N rows, by appending additional 
rows, where each row is another instance of the same bean type ?  That would 
make it possible to have N-record Forms that are bidirectional and that use 
HTML field validation.  Then the next logical step is to attach some JS that
adds an (N+1)th record at the end of the Form.

Is this making any sense ?  Isn't this more or less what is under discussion,
or did I manage to miss the point entirely ?  


BR

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] array/multiple beans from form submission

2006-05-29 Thread Fred Baube
Quoting Geert Bevin:
>
> > there's already a getSubmissionBean(BeanType.class) implementation...
> > which prepulates a bean with param values... I was just thinking aloud
> > on if we could have a getSubmissionBeans(BeanType.class) imp where a
> > List is returned instead, as happens to be what, in a sense,
> > I am trying to achieve here.

> Hmm that shouldn't be too hard to add. 
> Maybe you could take a crack at it ;-)

Then there really _would_ be bidirectional templates !

And there's plenty of Javascript "out there" for clicking
to add a new row to a table.  Then table/list editing could
be done 100% locally before POST'ing it.


my 0,02e

fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] The Book. When? :)

2006-04-27 Thread Fred Baube
> Anybody else want to write a one page executive summary about 
> RIFE and why to adopt it in a company or corporation?

"Full stack" means never having to worry about versioning 
of libraries.  Because Rife has approximately fifty billion 
unit tests, and because the downloads contain all the main 
dependencies ... when Geert posts a release, you _know_ it 
works.  All thru the stack. (*)


fred


(*) With quite rare exceptions. 

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Flexible Field Definition

2006-04-26 Thread Fred Baube
Quoting Stefan Thomas:
> 
> >Sounds like you want JCR-170  :-)
> >  
> Sounds like overkill ;)
> 
> However, I didn't even know about that standard *shame on me*, 
> very interesting. Thanks!

Apache Jackrabbit has hit 1.0, and the docs have improved 
dramatically lately, so it might be worth a look.


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] JavaPaste Install and Config

2006-04-26 Thread Fred Baube
> Maybe this will help?
> 
> http://rifers.org/wiki/display/RIFE/Examples+with+PostgreSQL+and+Tomcat
> 
> Obviously, the PGSQL part won't apply, but it should put you on the right 
> track.

the page about Derby is even easier to set up.


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Flexible Field Definition

2006-04-25 Thread Fred Baube
Quoting Stefan Thomas:

> So, I need to have a flexible bean definition that can be changed via 
> the admin interface. Any ideas how that could be realized?

Sounds like you want JCR-170  :-)

But, coudln't you simply define an "otherprops" String field that
has syntax like 

prop1=valA;prop2=valX;prop3=valD,valE,valF

Then tho you'd also want to build a Rife form on the fly, for
example text fields (or dropdown boxes) for prop1, prop2, prop3.
I haven't tried that myself.

Geert, is it possible to append form widgets to a block ?
I seem to recall a discussion that concluded that essentially, 
the template processor only makes a single pass, so that you 
cannot write out templating directives in one pass, and then 
have Rife render them on a second pass.


hth

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Re: RIFE Documentation (was: Javalobby discussion about RIFE needs input)

2006-04-24 Thread Fred Baube
> What do you consider the top 5 elementary 
> things to know for someone new to RIFE?
> 
> 1. Template syntax and concept?
> 2. Simple Element implementation?
> 3. ?
> 4. ?

3. input vars, output vars, global vars, input beans, output beans
4. variables and properties of the standard authentication elements 

> 5. ?


hth

fred

-- 
F.Baube*"Only with America's sovereignty dedicated 
Georgetown/MSFS/1988   *  in an historically relevant fashion to a 
fbaube#saunalahti.fi   *  cause larger than its own security will 
 gsm  +358 41 536 8192 *  the American interest again coincide with 
 wmd   60°11'10.8"N 24°57'36.9"E * the global interest." -- Z. Brzezinski 

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Some thoughts on RIFE's persistence framework

2006-04-23 Thread Fred Baube
Quoting Geert Bevin:
> 
> However, if you can, I recommend you use MySQL 5, 
> or even better PostgreSQL 8.1.

I'll second that.  PostgreSQL has always worked flawlessly.
MySQL is (imho) wobbly.

Or if you want something embedded, to deliver the whole shebang 
 in a single java archive without any native code dependencies, 
Derby has also installed and run fine (imho); I wrote it up in 
the wiki (under "Installation"). 

(Derby is becoming something of a standard, so ya can't go wrong.)

(And Rife's DB independence really works.) 


hth

fred2

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Java Persistence API

2006-04-18 Thread Fred Baube
Has anyone tried the Java persistence API download ?

It seems to cover some of the same territory as Rife's QueryManagers,
including automatic table generation, and/but it does rely quite a bit 
on special annotations (e.g. "@Entity", "@Id", '@OneToMany(cascade=ALL,
mappedBy=customer")', etc.).

It was written for Glassfish but has been released as a standalone
bundle that can run in J2SE too.

I wonder if there would be any reason to try to integrate this bundle 
into Rife.  (I'm generally a fan of Sun-led Java standards when the 
playing field is crowded, as it is with ORM.) 

Here's some example usage:
https://glassfish.dev.java.net/javaee5/persistence/persistence-example.html


fred

-- 
F.Baube* "I have had my results for a long 
Georgetown/MSFS/1988   *  time: but I do not yet know how 
fbaube#saunalahti.fi   *  I am to arrive at them."
 gsm  +358 41 536 8192 *  -- Karl Friedrich Gauss 
 wmd   60°11'10.8"N 24°57'36.9"E




___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] "Rife"

2006-03-30 Thread Fred Baube
Has everyone seen this ?  :) 

http://www.eweek.com/article2/0,1895,1943819,00.asp

Bevin said he named the project RIFE because he liked the 
word. "It means 'prevalent to an increasing degree,'" he 
said. "And when you mangle the letters around you get 'FIRE,' 
which is the RIFE logo." 


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Interview about RIFE at Java Posse

2006-03-24 Thread Fred Baube
Quoting Emmanuel Okyere:
>
> i think you got all the important points out... 

Yes, it was good !

There was one point which was "new" to me, in that 
I haven't heard it expressed quite that way before.  
Namely that, as Geert said, things like constraints 
propogate all thru the system, so that they only 
have to be configured once in order to work their 
magic _everywhere_.  That is damned powerful, and
it ought to draw developers like, well, a moth to 
a flame ?  :)


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Re: JavaPosse topics

2006-03-09 Thread Fred Baube
Quoting Scotty:

> In addition Rife/Crud is a Rails, derailer :-) 

Oooh, describe Rife as a Rails-killer and you'll 
give birth to a thousand entertaining flamewars !


BR

fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] RFC: Web Framework Sweet Spots BOF

2006-03-08 Thread Fred Baube
Quoting S. Meslin-Weber:

> Places RIFE doesn't fit... J2ME and JavaCard! For now at least :)

Hmm, but would it fit _here_?: 

http://blogs.cun.com/roller/page/davidgs?entry=the_birth_of_the_sun

Then you could have (say) a CRUD interface into realtime telemetry
and platform control. 

:)

BR

fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] JavaPosse topics

2006-03-08 Thread Fred Baube
Quoting Geert Bevin:
>
> Because I never "switched". [..] I never was in the situation where I  
> switched from a fully working solution (like JSF or Tapestry) to RIFE  
> as a fully working project. I never "evaluated" and "adopted" it in  
> such a context.

Good to know.  That's what I was getting at.

So in a way, you never got brainwashed by the competition  ;-) 


BTW as I'm surfing around, I'm getting that impression that 
the "Metadata for POJO's" concept is a hit.  I wonder if you 
might try packaging it into a minimum-complexity package which 
consists _only_ of MD4P "Metadata for POJO's" ... and see how 
many more downloads you get ... 

Java people talk about aspects and injection and all that 
good stuff, but here you've hit on something new & nifty, 
and it might be the just hook that reels in a whole bunch 
of new Rifers ... 

If they're running MD4P, then they already have the base
infra installed and running smoothly, and at that point it 
becomes absolutely painless to try out other Rife features. 


fred

--
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] JavaPosse topics

2006-03-06 Thread Fred Baube
> Is there anything that you find important to discuss, 
> or anything that you would like to know more about?

If I were a journalist, my first question to you would be: 


Why did you switch to RIFE ?


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] pathinfo capabilities

2006-03-03 Thread Fred Baube
Another dumb question (as usual :-) ... 
but this is an itch I'd like to scratch ... 

About pathinfo ...

Is it possible that within a URL, the order of the 
several pathinfo elements could be rearranged ?  
For example, that these could be equivalent:

http://mywebsite/geert/file/image/12.jpg
http://mywebsite/file/image/geert/12.jpg
http://mywebsite/image/file/geert/12.jpg

If so, this would make it RIDICULOULSY easy 
to implement a browser for faceted metadata.
That would be cool.

In any case, it would be (at least in principle) 
doable if each pathinfo element were taken from 
a list (i.e. if each element were enumerated). 
Processing time might go up kind of quickly tho, 
as the number of possible orderings jumped. 


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Template tag syntaxes

2006-02-18 Thread Fred Baube
(to reply to myself)

To define RIFE template syntax as an extension to XHTML
could make editors RIFE-aware and might also open up
possibilities for more complex template tag behavior.


fred


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Template tag syntaxes

2006-02-18 Thread Fred Baube
I guess the issues are 

* edit-time (pre-substitution) behavior: it would 
  be très nice to do DTD-driven editing based on an 
  extension to XHTML (or any other XML DTD :) , and 

* run-time in-browser (post-substitution) behavior: 
  if there are errors, 

   * does the doc stay well-formed and XHTML-valid 
 (so that a picky browser like FFox does not 
  catastrophically fail to render the document), and 

   * in a rendered XHTML view, are they visible 
(as faulty RIFE tags) or hidden ?

If you want tags to validate _as_XHTML_at_edit-time_, then 
the XHTML spec doesn't give you much support; there's only 
one user-defined attribute valid for all elements (IIRC; 
"class"), so editors would not give you much guidance, 
and runtime tag parsing & substitution would be a pain 
in the butt (unpacking multiply-assigned attributes). 

If common editors could be configured to treat the edit
-time doctype as a RIFE extension to XHTML, that would 
be cool, but I'm not sure that's possible.  I'm sure it 
would very much depend on the editor.  Ditto for PI's.  
(Short list: XXE, Oxygen, Serna.)  But then also the 
runtime templating engine could _change_ the doctype 
from RIFE-ML to XHTML. 

So I suppose that all-in-all, I'd guess that the PI 
approach is nicely, robustly, and undemandingly XML-ish. 


my 0,02e.

fred


-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Yahoo UI library

2006-02-14 Thread Fred Baube
Quoting Geert Bevin:
> 
> I played a bit with these today and they look very nice:
> http://developer.yahoo.net/yui/
> 
> Great way to easily spruce up you webapps!

They DO look nifty !  Especially the tree controls !

I've avoided tinkering with Ajax so far, mainly because
there are SO MANY libraries available.  But maybe Yahoo's
will grab soe serious mindshare.

Could a Rife XMLHttpRequest listener simply listen to the 
same servlet container port as the normal Rife filter ?  
Would I have to do anything special to listen for an 
XMLHttpRequest, considering that Rife converts HTTP 
requests into calls to ElementSupport.processElement() ?  
I guess I'm wondering whether Rife would drop them on 
the floor, or somehow pass them without doing all the 
"ordinary" processing.


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


(portlets) Re: [Rife-users] Where can we find the databaseschema for elephant and blablalist?

2006-02-12 Thread Fred Baube
Quoting Geert Bevin:
>
> http://uwyn.com/issues/browse/RIFE-261
> http://uwyn.com/issues/browse/RIFE-260
> 
> Feel free to work on it :-)

I'm looking at portlets stuff and it really does not look terribly
different from the servlet API.  Okay, portlets have three modes 
(VIEW, EDIT, HELP) and they deal in markup fragments not complete 
documents, but beyond that, is there anything mysterious ?

I googled around a bit trying to see if anyone has written an
adapter class, portlets<=>servlets, but I did not find anything.


fred


fwiw, resources:
"What Is a Portlet" http://www.onjava.com/lpt/a/6208
part 2: http://www.onjava.com/lpt/a/6459
"Developing Portlets with Apache Pluto"
 http://www.intranetjournal.com/articles/200511/pij_11_16_05a.html



> >I would think that Rife World Domination would be _greatly_
> >assisted by a system to put Elephant, Bamboo, and one's own
> >servlet to work inside a portlet framework !  Single sign-on
> >for complete workgroup support.
> >
> >http://www.onjava.com/pub/a/onjava/2005/09/14/what-is-a-portlet.html

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Looking for killer argument to defend the template language

2006-02-10 Thread Fred Baube
Call me nuts, but ...



Quoting Geert Bevin:
> 
> I'm writing my presentation about RIFE for TSSJS, and I just *know*  
> that many people in the audience will shriek when they see the  
> template syntax for the first time.

Every framework tries to wire together classes and presentation 
and a URL sitemap and so on and so forth, and this simply cannot 
be done clearly and consistently with this language at this point 
in time.  I suspect the sad fact is that in EVERY framework there 
is a single point of logical inconsistency where all the ugliness 
accumulates, just like a hairball.  Or perhaps an abstract class 
that implements interface hairball  :-) 

In Rife it's in the templates, but (as has been mentioned previ-
ously in this thread) the syntax is HTML editor -friendly, and 
the functionality is logicless and bidirectional, so the syntax 
has its upside.  And it also means that as compensation, the 
declarations of submissions and the usage of templates are 
relatively painless and straightforward to understand.  

In other frameworks the dead bodies (or, "gotchas") are more 
deeply buried, or the appealing simplicity breaks down much 
more drastically at a more painful point in the framework.  
This seems to be the focus of the Java-v-Ruby debate right 
now.  It's like learning a foreign language.  Each language 
has its point where suddenly the bloom is off the rose and 
oh crap! now you feel like you are pounding nails into your 
head.  For example, I've read that with spanish the first two
years are smooth sailing but the third year is the killer. 
With english the first year is a total breeze ("Grammar?  
WHAT grammar?!") but there's a pretty nasty brick wall 
somewhere around the next corner. 

Rife's template syntax is ugly because the (inevitable) seams
in the framework pop up in the presentation-layer markup. But 
OTOH you could troll the mailing lists of other frameworks to 
find out where _they_ bury _their_ dead bodies.




HTH!  :)

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] DbTransactionUser (withResult) (was: Limitation of GenericQueryManagers)

2006-02-08 Thread Fred Baube
> RIFE transaction support is available to everything DB-related. 
> By just called inTransaction on a DbQueryManager and providing a  
> TransactionUser, all the DB code that follows (also the GQM and 
> CMF code) will be wrapped in that transaction. It even supports 
> nested structures so that only only transaction will be used if 
> there's already one active.
> 
> More info here:
> http://rifers.org/wiki/display/RIFE/Chainable+transactions

Cool, but pretty confusing if one wants it to return data. The docs are 
inconsistent regarding the necessity of the generic parm "ResultType". 

If I understand the docs and the source code correctly, ...

1) I can use it with GQM's (if the GQM's are within compilation scope) 
like so:

final DbQueryManager manager = new DbQueryManager(MyDatasource);

DbTransactionUser MyTxn = new DbTransactionUser(List Objs) 
{
public void useTransaction() throws InnerClassException
{
Objs.add (GQM_1.doSomething()); 
Objs.add (GQM_2.doSomething()); 
GQM_1.doSomethingElse();
}
};
try {   manager.inTransaction(MyTxn); 
// success!
List ResultsOfSuccessfulTxn = MyTxn.getData();
}
catch (Exception e) { 
// failed; rolled back 
}

2) An implicit commit() is performed at the _end_ of the 
code block if and only if, _within_ the code block, 

a) no exception is thrown, and 
b) rollback() is not explicitly called. 

3) Therefore, _all_ DB actions that are to be grouped into a single
   transaction must be grouped within this same single code block.


fred


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] ElementSupport.initialize()

2006-02-08 Thread Fred Baube
Is it possible, inside initialize(), to determine whether it is 
being called before processElement() or before a submission ?

There is no info at
http://rifers.org/docs/api/com/uwyn/rife/engine/ElementSupport.html#initialize()


thx!

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Limitation of GenericQueryManagers

2006-02-08 Thread Fred Baube
Quoting Naren:
> 
> GenericQueryManagers require a int type setter and getter in Bean.

Speaking of which ... to revisit an old topic ... 

I need Rife's transaction support, which AFAICT is not available at 
all to GQM's. 

(I originally used GQM's in order to get the unique sequential ID's, 
but I no longer need them, so it's time to make the switch.) 

Does the changeover start by 

1) replacing calls to

GenericQueryManagerFactory.getInstance
(Datasource datasource, Class beanClass, String tableName) 
with
new DbQueryManager(Datasource datasource) 

2) and using the << .into("tablename")" >> method 

3) and making sure that each table has a column with the "unique" Constraint


thx!

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] RFC: RIFE-184 : Allow site-relative template name resolution

2006-02-07 Thread Fred Baube
>From the issue-tracker discussion, it seems clear 
that the current template syntax is _broken_, since 
what looks like relative is in fact absolute.

And, slashes and dots are already "taken", so a new 
notation is needed, until notations can be harmonised
in the longer term. 

Perhaps a relative path could begin with (say) "~" ?
This could refer to the "nearest" (i.e. most deeply 
nested) subsite. 


hth

fred


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Where can we find the databaseschema for elephant and blablalist?

2006-02-04 Thread Fred Baube
I would think that Rife World Domination would be _greatly_
assisted by a system to put Elephant, Bamboo, and one's own 
servlet to work inside a portlet framework !  Single sign-on
for complete workgroup support. 

http://www.onjava.com/pub/a/onjava/2005/09/14/what-is-a-portlet.html


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] parsing XML data from a remote server within RIFE app

2006-01-30 Thread Fred Baube
I too had XML parsing barf inside Rife, and 
I had to turn off Rife's custom classloader.

Check the archives, this was a couple of weeks ago.


HTH

fred


-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


[Rife-users] test

2006-01-30 Thread Fred Baube
please ignore ...


___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] "In Bed with RIFE" => chained

2006-01-23 Thread Fred Baube
> At last, we took some time to prepare, record and edit the first  
> episode of our podcast: In Bed with RIFE.

That was a good point, about the "gotcha" with chained setters (or 
"fluent interface" or whatever) -- you don't want to mistakenly 
invoke the superclass method when you wanted the subclass method. 

I guess the technique is that as you chain them, you have to start 
(from the left) with the furthest-down subclass, and as you chain 
them from left to right, climb the inheritance hierarchy.

new SubSubClass(arg1,arg2)
.subsubclass_setFoo(aFoo).subclass_setBar(aBar).superclass_setFloob(aFloob);


So I guess y'all had a big Skype conference call ?
 The sound quality was quite good. 

About the choice of music ... I would say, 
how about a local band (i.e. local to UWYN) ?  :) 


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://lists.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Classpath (& ResourceFinder)

2006-01-18 Thread Fred Baube
I wonder if I need to replace the default 
com.uwyn.rife.resources.ResourceFinder 
with an instance of 
com.uwyn.rife.resources.ResourceFinderDirectories.


>   System.getProperty ("java.class.path");

webapps/myapp/WEB-INF/classes/ does not appear 
in this classpath list.  Therefore it looks like 

-- the search path for participant data defaults to 
   webapps/myapp/WEB-INF/classes/ 

-- therefore participants easily find "rep/users.xml" 
   and "rep/datasources.xml" 

-- specifying additional search directories, perhaps 
   above webapps/myapp/WEB-INF/classes/ , is problematic 
   unless a different ResourceFiner is used. 


thx

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Classpath

2006-01-18 Thread Fred Baube
Quoting Geert Bevin:
>
> This is the standard Java classpath. Everything applies for it that  
> usually applies to the Java classpath.

I'm finding that the classpath is defined at runtime
the way I need it to be; I verify it with

System.getProperty ("java.class.path");

...and yet it is still not finding the XML file that is referenced 
for ParticipantMemoryUsers.  The XML file is located in the first 
directory on the classpath.  Is there something I'm missing ?  Some 
tip on getting it to work as expected ?   Or am I just dumb ?  :-O 

fred


> >Another potentially quite stupid question ...
> >
> They are looked up through the classpath, just as any RIFE
> resource is by default. Relative paths don't work.
> >>>_Strictly_ speaking, that's not correct, is it ?
> >>>For example, "rep/users.xml" is a relative path, and it works.
> >>No, it's looked up absolutely, just like any resource in Java.
> >>It's looked up from the root of the classpath, not according to
> >>a filesystem.
> >
> >I have not dealt with classpath issues too much.
> >
> >When you talk about "the root of the classpath" that is used to
> >search for (for example) parameters supplied in rep/participants.xml,
> >
> >-- is this the same as the value of the CLASSPATH env.variable 
> >   when the servlet contsiner is started ?
> >
> >-- is this the same as the value of the Java system property 
> >   that is available to programs at runtime ?
> >
> >-- so, would it be possible to add additional directories to
> >   this classpath simply by adding some to CLASSPATH ?
> >
> >-- or, is this classpath something that is defined by and for Rife ? 
> 
-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Classpath

2006-01-18 Thread Fred Baube
Another potentially quite stupid question ...

> > > They are looked up through the classpath, just as any RIFE 
> > > resource is by default. Relative paths don't work.
> > _Strictly_ speaking, that's not correct, is it ?
> > For example, "rep/users.xml" is a relative path, and it works.
> No, it's looked up absolutely, just like any resource in Java. 
> It's looked up from the root of the classpath, not according to 
> a filesystem.

I have not dealt with classpath issues too much.

When you talk about "the root of the classpath" that is used to 
search for (for example) parameters supplied in rep/participants.xml, 

-- is this the same as the value of the CLASSPATH env.variable 
   when the servlet contsiner is started ?

-- is this the same as the value of the Java system property 
   that is available to programs at runtime ?

-- so, would it be possible to add additional directories to
   this classpath simply by adding some to CLASSPATH ? 

-- or, is this classpath something that is defined by and for Rife ? 


thx much

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] About relative paths for Rep references

2006-01-18 Thread Fred Baube
Quoting Geert Bevin:
>
> They are looked up through the classpath, just as any RIFE resource  
> is by default. Relative paths don't work.

_Strictly_ speaking, that's not correct, is it ?  
For example, "rep/users.xml" is a relative path, and it works. 

What I have tried instead is to create a participant which uses an 
environment variable to locate users.xml.  To do this I changed the 
access of ParticipantMemoryUsers.mUsers from private to protected, 
then extended it to override initialize().

Unfortunately this approach fails at startup, with a message which 
gives no clues about how to fix it.  Any assistance would be most 
welcome. 

fred

Jan 18, 2006 12:40:41 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter RIFE
javax.servlet.ServletException: Fatal error while creating memory users.
at com.uwyn.rife.servlet.RifeFilter.init(RifeFilter.java:63)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79)
at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3563)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4133)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:804)
at 
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:497)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1195)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at 
org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
at 
com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
at 
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
at 
com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
at 
org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
at 
org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:636)
at 
org.apache.catalina.manager.ManagerServlet.doPut(ManagerServlet.java:423)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:712)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:514)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:663)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Jan 18, 2006 1:07:51 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter RIFE
javax.servlet.ServletException: Fatal error while creating memory users.
at com.uwyn.rife.servlet.RifeFilter.init(RifeFilter.java:63)
at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
at 
org.apache.ca

[Rife-users] About relative paths for Rep references

2006-01-18 Thread Fred Baube
MemoryUsers are defined in a file.  Is there any reason why the file that
is pointed to cannot be in a directory level well above the normal place ?

I ask because I find that this reference does not seem to work: 

 
ParticipantMemoryUsers


thx

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Own CredentialsManager

2006-01-17 Thread Fred Baube
Quoting Geert Bevin:
> 
> On 17-jan-06, at 12:59, Fred Baube wrote:
> 
> >To follow up on my own question ...
> >
> >>So, then, it is entirely the responsibility of my own
> >>CM implementation to devise a mapping between usernames
> >>and userid's that both (a) creates unique userid's, and
> >>(b) keeps the mapping consistent -- within a particular
> >>session -- _across_ calls to verifyCredentials(..) ?
> >
> >Do I need to do anything to make this mapping available
> >to other elements in the Rife authentication framework ?
> >In other words, is there any other interface that my CM
> >needs to implement, so that other code can map a username
> >to a userid, or vice-versa, whenever needed ?
> 
> For the authentication framework to work you need these 
> (as specified in the javadocs):
>
> * CredentialsManager
> * SessionManager
> * SessionValidator

I guess I thought I could write a CM and drop it in without
changing anything else, but clearly that won't work unless 
my new code also implements RoleUsersManager and in effect 
completely replaces MemoryUsers or DatabaseUsers. 

The less ambitious alternative is to write a blocking Rep 
 participant which gathers the required authentication info 
and prepares it for use by the Rep participant that handle 
authentication (i.e. MemoryUsers or DatabaseUsers). 

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Own CredentialsManager

2006-01-17 Thread Fred Baube
To follow up on my own question ...

> So, then, it is entirely the responsibility of my own 
> CM implementation to devise a mapping between usernames 
> and userid's that both (a) creates unique userid's, and 
> (b) keeps the mapping consistent -- within a particular
> session -- _across_ calls to verifyCredentials(..) ? 

Do I need to do anything to make this mapping available 
to other elements in the Rife authentication framework ?  
In other words, is there any other interface that my CM 
needs to implement, so that other code can map a username 
to a userid, or vice-versa, whenever needed ?


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Own CredentialsManager

2006-01-17 Thread Fred Baube
I find that I'd like to write my own implementation 
of com.uwyn.rife.authentication.CredentialsManager, 
so that I can decide at runtime what source(s) to use 
for authentication info. 

The CM interface couldn't be simpler, but obviously it 
is necessary to assign a unique << (long) userid >> to 
every username. 

This mapping between usernames and userid's does not 
need to be consistent _between_ application sessions, 
only _within_ an application session, yes ? 

So, then, it is entirely the responsibility of my own 
CM implementation to devise a mapping between usernames 
and userid's that both (a) creates unique userid's, and 
(b) keeps the mapping consistent -- within a particular
session -- _across_ calls to verifyCredentials(..) ? 


thx

fred

--
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Rife+Tomcat env.var problem

2006-01-16 Thread Fred Baube
Quoting Geert Bevin:
> >SO ... is there a way to execute code _before_ the driver is loaded ?
> 
> The driver should only be loaded when your datasources are initialized. 
> So if you add another blocking participant that executes before the 
> datasource initialization, you should be able to alter the system 
> properties.

*slaps forehead*

Of course !  Very good.

My rep/participants.xml currently looks like this:




  ParticipantConfig
  ParticipantDatasources
  ParticipantMemoryUsers
  my.rep.MyParticipant
  ParticipantSite


Since I can use << blocking="true" >> to strictly 
 sequence the execution of these, I just need to 
drop in a new participant btwn Config & Datasources.


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Rife+Tomcat env.var problem

2006-01-15 Thread Fred Baube
Apparently I need to execute code before the DB driver is loaded. 

Quoting Geert Bevin:
>
> Java properties are not the same as system environment variables. 
> You provide properties through the java -D command line argument.

Of course.  My oversight.

But the problem persists.  When we take system env.variables and 
define them to the JVM using "-D", the short test program can see 
them, and Rife on Linux can see them, but Rife on Windows can_not_. 
Something is screwed up.

Per  http://db.apache.org/derby/docs/10.1/tuning/tuning-single
under "Ways of setting Derby properties" : "Using a properties 
object within an application or statement", I can set the value 
programmatically with a call like this: 

Properties p = System.getProperties();
p.put("derby.system.home", "C:\databases\sample");

BUT it also says that "you can also set system properties within 
an application using a Properties object before loading the Derby 
JDBC driver." 

SO ... is there a way to execute code _before_ the driver is loaded ?


fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Rife+Tomcat env.var problem

2006-01-15 Thread Fred Baube
> Is is present when you do 
> System.getProperty("derby.system.home") in Windows?

My partner ran this program:

public class JT {
public static final void main (String [] args) {
System.out.println ("DERBYDB_HOME: " + System.getProperty("DERBYDB_HOME"));
System.out.println ("derby.system.home: " +
System.getProperty("derby.system.home"));
} }

and he reports:

well, it gives all nulls.

but when I check them like 'echo %DERBYDB_HOME%' etc. or 
from the windows control panel, I get the correct values.

SO, I'm stumped.  But I guess it's not a Rife issue ...


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Rife+Tomcat env.var problem

2006-01-15 Thread Fred Baube
I'm not sure whether this is a Rife question or a Tomcat question, 
but maybe someone has seen this before and can help me out.

Simply put, we set environment variables (like, for example,
DERBYDB_HOME) but my Rife app cannot see them.

I fetch them with calls like this in my Rep startup code:

HierarchicalProperties PP = Rep.getProperties();
String  DERBYDB_HOME = PP.getValueString ("derby.system.home");

This works fine on Linux, where I set env.vars in Tomcat's
startup.sh, but it does not work on Windoze.

We've tried settign them in Tomcat's startup.bat, and also
in Tomcat's Windoze manager GUI.

Does this sound familiar to anyone ?


thx much

fred

-- 
F.Baube *  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Possible classloader problem?

2006-01-12 Thread Fred Baube
Quoting Geert Bevin:
>
> First, make sure that you're using 1.3.1, 
> I made some classloader fixes in it. 

1.3.1 fixed the problem.

Why didn't I install it two days ago ?  *shit* ...


fred

___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Possible classloader problem?

2006-01-12 Thread Fred Baube
Quoting Geert Bevin:
>
> You can set "engineclassloader.enabled" to false as a servlet or filter 
> init param in your web.xml. That disables RIFE's classloader. Like that 
> you can check.

GADZOOKS !  Or should I say, ZOWIE !  :) 

It did seem to fix it !  

I'll follow up if I have some useful info.


fred


> > Further down in this message is a code fragment that tries to 
> >set the "lexical-handler" property of a SAX XMLReader, like so:
> >
> > reader.setProperty(LEXICAL_HANDLER_PROPERTY,this);
> >
> >The classes that use this fragment implement SAX's LexcalHandler.
> >
> >When I execute it inside a simple servlet class like this:
> >
> > public class HelloWorldExample extends HttpServlet 
> > implements ContentHandler, LexicalHandler 
> > {
> > public void doGet(HttpServletRequest request,
> > HttpServletResponse response)
> > throws IOException, ServletException
> >
> >it is able to set the lexical-handler property of the parser.
> >
> >But when I execute it in class that is called from a Rife 
> >Element, like so:
> >
> > public class WriterLex extends DefaultHandler2 { 
> >
> >it _always_ fails on the call
> >
> >
> >FWIW I've also tried 
> >
> > WriterLex implements LexicalHandler {
> >
> >and a dozen other combinations. 
> >
> >I've done my best to narrow it down this problem, I've tried 
> >configuring XMLReaderFactory's and SAXParserFactory's, but 
> >the call to setProperty(..) consistently fails inside Rife.
> >
> >Does this sounds like any known problems with classloading ?
> >
> >
> >fred
> >
> >
> >the code fragment:
> >
> >public static final String SAX_DRIVER_PROPERTY = "org.xml.sax.driver";
> >public static final String LEXICAL_HANDLER_PROPERTY =
> >"http://xml.org/sax/properties/lexical-handler";;
> >
> >  try {
> >if (System.getProperty(SAX_DRIVER_PROPERTY) == null){
> >   //The default sax driver is set to xerces's sax driver
> >   System.setProperty(SAX_DRIVER_PROPERTY, 
> >   "org.apache.xerces.pars\ers.SAXParser");
> >}
> >reader = XMLReaderFactory.createXMLReader();
> >// I also tried 
> >"com.sun.org.apache.xerces.internal.parsers.SAXParser"
> >
> >System.out.println ("Clsnm: " + reader.getClass().getName());
> >reader.setContentHandler (this);
> >reader.setProperty (LEXICAL_HANDLER_PROPERTY,this);
> >System.out.println ("SUCCESS!");
> >  }
> >  catch (Exception e) {
> >e.printStackTrace();
> >  }
> >  }

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Possible classloader problem?

2006-01-12 Thread Fred Baube
I have a problem that I've burned a couple of days on, without 
success.  Now my latest testing makes me wonder if it might be 
a classloader problem related to Rife. 

 Further down in this message is a code fragment that tries to 
set the "lexical-handler" property of a SAX XMLReader, like so:

reader.setProperty(LEXICAL_HANDLER_PROPERTY,this);

The classes that use this fragment implement SAX's LexcalHandler.

When I execute it inside a simple servlet class like this:

public class HelloWorldExample extends HttpServlet 
implements ContentHandler, LexicalHandler 
{
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException

it is able to set the lexical-handler property of the parser.

But when I execute it in class that is called from a Rife 
Element, like so:

public class WriterLex extends DefaultHandler2 { 

it _always_ fails on the call


FWIW I've also tried 

WriterLex implements LexicalHandler {

and a dozen other combinations. 

I've done my best to narrow it down this problem, I've tried 
configuring XMLReaderFactory's and SAXParserFactory's, but 
the call to setProperty(..) consistently fails inside Rife.

Does this sounds like any known problems with classloading ?


fred


the code fragment:

public static final String SAX_DRIVER_PROPERTY = "org.xml.sax.driver";
public static final String LEXICAL_HANDLER_PROPERTY =
"http://xml.org/sax/properties/lexical-handler";;

  try {
if (System.getProperty(SAX_DRIVER_PROPERTY) == null){
   //The default sax driver is set to xerces's sax driver
   System.setProperty(SAX_DRIVER_PROPERTY, 
"org.apache.xerces.pars\ers.SAXParser");
}
reader = XMLReaderFactory.createXMLReader();
// I also tried "com.sun.org.apache.xerces.internal.parsers.SAXParser"

System.out.println ("Clsnm: " + reader.getClass().getName());
reader.setContentHandler (this);
reader.setProperty (LEXICAL_HANDLER_PROPERTY,this);
System.out.println ("SUCCESS!");
  }
  catch (Exception e) {
e.printStackTrace();
  }
  }




-- 
F.Baube   *  
Georgetown/MSFS/1988  *  Think pangalactically. 
fbaube#saunalahti.fi  *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd  60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] Steps of authentication

2006-01-04 Thread Fred Baube
In the HTTPAuthentication example, there are 
two distinct steps in credentials validation:

1) RoleUser credentials = new RoleUser(username, password, role);
   if (credentials.validate()) { [..]

2) long userid = MemoryUsers.getRepInstance().verifyCredentials(credentials);
if (userid >= 0) { [..] 

Apparently step 1 only makes simple checks about 
the existence of arguments, while step 2 performs
the actual check of the username+password combo ?


curious,

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E
___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


Re: [Rife-users] Impl. HTTP Basic Authentication

2006-01-04 Thread Fred Baube
thusly spake Geert Bevin:
> 
> instead of trying to explain it differently, I implemented 
> an element that provides you with basic HTTP authentication, 
> integrated with RIFE's memory users.
> 
> You can find it here:
> http://rifers.org/wiki/display/RIFE/HTTP+authentication

This code works fine.  Thanks !

I need to have this code set cookies, for compatibility 
with other code, and I see that the relevant code is in
com.uwyn.rife.authentication.elements.Authenticated.startNewSession().
I wonder if it might make sense to have HttpAuthentication 
_extend_ Authenticated, or perhaps even RoleUserAuthenticated ? 
Perhaps not ... The code as-is is a good example of how 
to write your own standalone authentication element  :) 

Also, I would like HttpAuthentication to accept a _set_ of 
roles, so that a user could login who has _any_ of these 
roles, and then an exit is selected based on the role.
Like so:

[ sitemap ]

   role1 role2 role3


[ HttpAuthentication ]
if (theRole.equals ("role1")) redirect ("/foo/menu");
if (theRole.equals ("role2")) redirect ("/bar/menu");
if (theRole.equals ("role3")) redirect ("/byob/menu");

I guess then that code for credentials validation could be 
 modified to try each username+password+role combination, 
until one succeeds: 

SessionManager  sessionMgr = MemorySessionsFactory.getInstance();
SessionValidator validator = new MemorySessionValidator();
MemoryUsers credentialsMgr = MemoryUsers.getRepInstance();
validator.setCredentialsManager(credentialsMgr);
validator.setSessionManager(sessionMgr);
validator.setRememberManager(null);

String username = cred_arr[0];
String password = cred_arr[1];
List roles = StringUtils.unpack(getPropertyString("role")); 
for (String role : roles) {
RoleUser credentials = new RoleUser(username, password, role);
if (credentials.validate()) { 
// succeeded; select appropriate exit
[..] 


thx

fred

-- 
F.Baube*  
Georgetown/MSFS/1988   *  Think pangalactically. 
fbaube#saunalahti.fi   *  Act locally.
 gsm  +358 41 536 8192 *  
 wmd   60°11'10.8"N 24°57'36.9"E

___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users


[Rife-users] test

2006-01-03 Thread Fred Baube
testing ...

___
Rife-users mailing list
Rife-users@uwyn.com
http://www.uwyn.com/mailman/listinfo/rife-users