Re: Continuations loosing state

2006-05-17 Thread Berin Loritsch




Simone Gianni wrote:

  Hi Berin,
what do you mean with state? Could you post an example of code and point
out the unexpected behaviour?
  


I decided to work without them so the code is now gone.  However, as an
example, I had an object called CountryHotTopics which had a list of
tags and the list of tags that were designated hot topics.  The
reference to the object still exists and is resolved.  However, the
contents of the object are gone.

-- 

  

  
  

  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Continuations loosing state

2006-05-17 Thread Berin Loritsch




It seems that when I use continuations that it is losing a lot of
state.  My method and environment sets up a lot of information, but all
of it is lost every time I resume the continuation.  Yet with CForms it
seems to save state properly.  What gives?  Is there some manual method
of saving and restoring state that I have to do?  In short they are not
acting like proper continuations and instead are only maintaining the
program stack w/o state.

-- 

  

  
  

  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Need a new Forms Sample (and other improvements to forms)

2006-05-12 Thread Berin Loritsch




Based on my experiences with CForms, I have to say that I am very
frustrated.  Yet at this point we are committed.  I think something
that would greatly reduce my frustrations as well as other potential
users is a full soup to nuts explanation of how to set up forms for
your existing application from scratch.  Next, and possibly just as
important, how to use CForms to do tag management like del.ico.us and
Flickr.  There should be three tracks depending on what you bind your
form to.  I'm not the guy to do it because I am completely lost and I
can't seem to make heads or tails of where I am in the process or what
is going wrong.

Now, as to improvements to forms, there are some things that are
absolutely necessary in order to make use of CForms.  First, is a
special type of sitemap.  An extension, if you will, that automatically
adds the matchers necessary to resolve the _javascript_ resources instead
of relying on people to set that up themselves.  It would also include
the declarations for the CForm specific
generators/selectors/serializers/transformers/etc.

Additionally, there are two ways to set up forms depending on whether
AJAX is enabled or not.  Typically you have a generator followed by a
transformer.  Why not make one forms generator that handles that for
you (i.e. auto-chains the necessary transformations right after the
source is generated ala JX script)?  Also there is a transformation
followed by a choice of serializer.  Again, why not have a forms
serializer that takes care of the final transformation and choice of
serializer for you?

It took me a week of trial and error to figure out why things were only
partially working on an upload form.  I finally have it working, but
the AJAX enabled portion is not doing its job right.  There is more
trial and error and I don't have another week to futz with it.

At this point, I'm going to have to give up on doing things the CForms
way and hack together something that is far less elegant but I know
will work.  At least I will be able to report progress.  I'm sharing
these observations in the hopes that we can avoid having more folks as
frustrated as me.

-- 

  

  
  

  
     Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Re: Bean Binding and Repeaters...

2006-05-12 Thread Berin Loritsch




Thank you very much for the help so far.  The boolean is rendering
properly, and it looks like I need to create a custom binder.  So, how
do I add that custom binding to the CForm?  I saw the interface, I just
need to hook it in.

Simone Gianni wrote:

  Hi Berin,
  



   

First, in both repeaters you should specify that id is the identity
field. Without the identity field the repeater binding is not able to
find match a row with a bean in the list.

When the repeater receives all the request parameters, it takes the
terms.0.id (or any other identity field you specified, you can specify
more than one) and searches in the list for a bean having that termId.
If it finds it then execute the rest of the binding against it,
otherwise the row is marked as being a new row and a binding to create
the new row is searched. Since there isn't any, something is written in
the log file and that repeater row is discarded. But the most harmful
thing is that after doing all this, it searches for all the beans that
didn't matched any row in the repeater, and removes them from the list,
even if there is no explicity binding to remove them. While JXPath is
not able to add a new bean in a collection without an explicit binding
(since could not know which class instantiate), it's extremely able in
removing them :)

Second, we usually put the  of a repeater inside an
. Somewhere between 2.1.6 and 2.1.7 AFAIK fb:on-bind was
introduced and many repeaters didn't worked correctly if it's not there.

Third, the ***  is correct?
you have a getIsPostHT() in your class? I think this is a common
mistake, and believe it should be ** since you have either a public boolean isPostHT() or
public boolean getPostHT() in it.

So, it should be :


  



  Let us know if this works any better.

Simone

  



-- 

  

  
  

  
     Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Re: Bean Binding and Repeaters...

2006-05-12 Thread Berin Loritsch

Simone Gianni wrote:

Hi Berin,

Berin Loritsch wrote:

  

I've got the CForm displaying the information in the database--even
though the  doesn't display checked if Tag.isHotTopic
is true.



I know it seems strange, but try to convert it/add a getter getHotTopic.
I couldn't determine why, but sometimes JXPath does not read from "is"
getters.
  

:/  Not JavaBean compliant?  Ok, I'll try that.


When I click the submit button for the form, I get an exception in the
part where CForms is supposed to save back to the object:

Factory
[EMAIL PROTECTED]

could not create an object for path: /terms



Is there a setTerms? is getTerms a collection or what? It would be
useful if you could post the binding file and at least the interfaces of
your business objects.
  


There is.

CountryHotTopics

List getTerms(); // Term == Tag for this discussion
setTerms(List);
List getHotTopics();

The terms (tags) is a collection.

Attached is my Model and Binding.

--
*Berin Loritsch*
Owner   

*Work:* 571-215-7708
*Email:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
*IM:* [EMAIL PROTECTED] (MSN)
*http://www.linkedin.com/in/bloritsch
*
* * *D-Haven* <http://d-haven.org>
20044 Great Falls Forest Dr.
<http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en> 
Great Falls, VA 22066

USA

See who we know in common <http://www.linkedin.com/e/wwk/5678360/> 	Want 
a signature like this? <http://www.linkedin.com/e/sig/5678360/>



http://apache.org/cocoon/forms/1.0#binding"; path="/">
  
  
	  
	  
	  
  
  
  
	  
  

http://apache.org/cocoon/forms/1.0#definition"; xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>
  
  
	Terms Used
  	This is a list of all terms used in your country.  They can be promoted to become hot topics
  	...
	
	  

	  
  	  
  	Term
  	
  	  
  	  
  	HT?
  	Make this term a hot topic?
  	
  	  
  	var longdesc = this.lookupWidget("../displayName");

  	if (longdesc.value == "")
  	{
  	longdesc.value = this.lookupWidget("../term-name").value;
  	}

longdesc.state = (this.value) ? 
org.apache.cocoon.forms.formmodel.WidgetState.ACTIVE :
org.apache.cocoon.forms.formmodel.WidgetState.OUTPUT;
  	  
  	
  	  
  	  
  	
  	  
	
  
  
	Hot Topics
  	This is a list of all hot topics used in your country.  They can be promoted to become hot topics
  	...
	
	  

	  
  	  
  	
  	  
	
  
  
Done
  
  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Bean Binding and Repeaters...

2006-05-12 Thread Berin Loritsch

I haven't seen this anywhere, and I need to know how to do it.  I've got
a bean that has two lists with the same type of object in each list.
For example:

CountryHotTopics
---
tags
hotTopics

Both lists (tags and hotTopics) are filled with Tag objects.  I'm trying
to have CForms manage the relationship.  In essence, a "Hot Topic" is a
tag that is marked as being important so a link to a list of items
marked with the tag is displayed on the front page.  The Tag object has
four attributes:

Tag
-
id
name
isHotTopic
longName

(the last one is for how the hot topic is displayed).

I've got the CForm displaying the information in the database--even
though the  doesn't display checked if Tag.isHotTopic
is true.

I need the CForm to add a reference to the Tag object to the
CountryHotTopics.hotTopics list when it is checked.  But before I can
get there, I'm still struggling with basic binding.

When I click the submit button for the form, I get an exception in the
part where CForms is supposed to save back to the object:

Factory
[EMAIL PROTECTED] 


could not create an object for path: /terms

How do I control/specify the same type to convert the form results to?
I'm using the binding protocol defined by the CForms Binding XML
standard.  There just doesn't seem to be a suitable example to pull any
kind of experience from.  Anybody have some clues/tips/suggestions?

--
*Berin Loritsch*
Owner   

*Work:* 571-215-7708
*Email:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
*IM:* [EMAIL PROTECTED] (MSN)
*http://www.linkedin.com/in/bloritsch
*
* * *D-Haven* <http://d-haven.org>
20044 Great Falls Forest Dr.
<http://maps.google.com/maps?q=20044+Great+Falls+Forest+Dr.%2CGreat+Falls%2CVA+22066%2CUSA&hl=en> 


Great Falls, VA 22066
USA

See who we know in common <http://www.linkedin.com/e/wwk/5678360/>Want
a signature like this? <http://www.linkedin.com/e/sig/5678360/>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pointer to good Java Binding Cocoon Forms docs?

2006-05-10 Thread Berin Loritsch




Antonio Gallardo wrote:
Hi Berin,
  
  
In the sample there is a nice step by step tutorial of how bean
framework works [1] lookup for "Binding samples".
  
  
Best Regards,
  
  
Antonio Gallardo.
  
  
[1] http://cocoon.zones.apache.org/demos/21branch/samples/blocks/forms/
  


It's not a "how to" which is what I need.  It's a working sample and I
have to figure out by reverse engineering how the thing works.  I need
it, not only for myself but for my colleagues as well.  This is the
text I see:

 Cocoon Forms has a binding framework which
assists in copying Java-bean or XML (DOM) data into a form and back. 
XML
Binding - A form for just editing an XML file.
Simple
XML Binding - A form for just editing XML data. Illustrates the
XMLAdapter.
Bean
Binding - A form for just editing a Java bean
 Step-by-step tutorial into individual binding
features: 
1.
Binding Simple Values - fb:*/@direction and fb:value/*
2.
Lenient Binding - fb:*/@lenient
3.
Aggregate Binding - fb:aggregate
4.
Heavy Form - Form with lots of select boxes - test memory
utilization, performance
5.
Custom Bindings using Java or _javascript_ - fb:_javascript_ and
fb:custom
6.
XML binding using namespaces - Using XML binding with complex
namespaced XML

And on each link is an example of a form.  There's no link to a "how
to" or tutorial there.

-- 

  

  
  
    
  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






Pointer to good Java Binding Cocoon Forms docs?

2006-05-10 Thread Berin Loritsch




I am at a point where I need good step by step instructions on binding
a CForm to a Java object (in the JavaBean idiom).  I'm talking from the
beginning.  The reference docs on the Cocoon site are "ok" if you have
the environment set up already.  I have done Google searches and tried
following the samples, but I'm still hit and miss here.

I'm staring up the end of a deadline and I only have some frustration
to show for it.  I believe I only need some coaching at this point, but
there isn't anything that really qualifies for "This is where you begin
and how things work together".  I need some kind of pointer, please.  I
know CForms works, because of some of your comments.  I just can't seem
to get it working for me.

-- 

  

  
  
    
  
 Berin Loritsch
Owner 
 

  

  
  


  
  

  
 Work:
571-215-7708

 Email: [EMAIL PROTECTED]
IM:
[EMAIL PROTECTED] (MSN)
 http://www.linkedin.com/in/bloritsch

 

 D-Haven
20044 Great Falls
Forest Dr.
 Great Falls, VA 22066
USA

  

  
  


  See who we
know in common
  Want a signature like
this?

  






CForms and Uploads?!?!

2006-05-03 Thread Berin Loritsch
I am beyond frustrated with trying to adapt the CForms upload feature to 
our application.  I have about two hours left for today, and I'd like to 
get it working, but if I can't I will resort to the traditional method 
of forms and actions.


Please, if you have bandwidth to spare, contact me on MS Messenger: 
[EMAIL PROTECTED]


I'm experiencing strange things.  Once the initial form is displayed and 
sent to the server, whether everything is OK or not, it goes to the 
"success" scenario.  Worse, the "success" scenario is a cocoon stack 
trace with a SAXException saying "No Cocoon Form found."  Nothing I can 
see in my sitemap or flowscript suggests that that should happen, and 
yet here I am.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JXel Issues, Won't recognize params from sitemap

2006-03-23 Thread Berin Loritsch

Bruno Dumon wrote:

On Thu, 2006-03-23 at 15:27 -0500, Berin Loritsch wrote:
  
I need to pass parameters into my Jexl.  As long as the call to the 
resource originally comes from the flowscript, everything seems to be 
OK.  HOwever, I can't seem to pass parameters directly from the sitemap.


Anyone know what's going on?



There are indeed some differences between calling JXTemplate from flow
or directly, though I don't recall what these were exactly (would need
to check the sources). Some things you might try until someone more
experienced helps you:

* instead of "cocoon.parameters", use just "parameters"
* try JXPath instead of Jexl: #{$cocoon/parameters/something}
* or if you're on Cocoon 2_1_x head, use the template block instead
(just switch the jx declaration to o.a.c.template.JXTemplateGenerator)
which should solve these differences

  


It turns out that you can't use Java Objects other than string if you 
are passing from the sitemap.  I consider this to be a bug.  
Particularly since you can't pass in anything through 
cocoon.request.getAttribute() unless you go through a flowscript?!?  I 
eventually had to bounce the request through a flowscript just to get 
the value passed.  It's a pain in the arse.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JXel Issues, Won't recognize params from sitemap

2006-03-23 Thread Berin Loritsch
I need to pass parameters into my Jexl.  As long as the call to the 
resource originally comes from the flowscript, everything seems to be 
OK.  HOwever, I can't seem to pass parameters directly from the sitemap.


Anyone know what's going on?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Large Navigation Menus?

2006-03-22 Thread Berin Loritsch

Does CForms have easy ways of using forms to navigate a complex structure?

We have a set of over 400 locations in a hierarchy, and over 200 topics 
in a hierarchy that we need to let the user navigate.  The current 
solution we have (using a third party Javascript library) introduces 
over 5 seconds of client side rendering with this scenario.  That's 
unacceptable for our users, as some of them have already waited over 8 
seconds for the page to download.


A solution that would allow us to navigate one part of the hierarchy at 
a time would be ideal.  All our clients are using IE 6, with a very 
small minority using IE 5.5.  We need something ASAP, and we are trying 
get some good yet quick ideas.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a change in cocoon.sendPage?

2006-02-23 Thread Berin Loritsch

Jason Johnston wrote:

I tried upgrading to Cocoon 2.1.8 from 2.1.7 and one of the flowscripts
is throwing a mysterious exception.

I'm getting this:

[EMAIL PROTECTED]: NOT_FOUND is not a function.

The offending line is this:



Actually if you look deeper down the stacktrace it looks to me like the
real problem is in your JX template.  The .sendPage() line is just in the
trace because it's what's calling the pipeline processing and therefore is
at the top of the call stack.
  


Thanks.  I've got it figured out now.  The thing the threw me off was 
the stack trace sighting org.*.JAVASCRIPT.* in a flowscript page.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Is there a change in cocoon.sendPage?

2006-02-23 Thread Berin Loritsch

I tried upgrading to Cocoon 2.1.8 from 2.1.7 and one of the flowscripts
is throwing a mysterious exception.

I'm getting this:

[EMAIL PROTECTED]: NOT_FOUND is not a function.

The offending line is this:

   cocoon.sendPage(cocoon.parameters.internalpipeline,
{"scope":scope,"listbean":listbean,"action":cocoon.parameters.action});

we set cocoon.parameters.internalpipeline to the "callback" so it is a
relative URL



TypeError: [EMAIL PROTECTED]: NOT_FOUND is not a 
function. (file:/C:/Program Files/Apache Software Foundation/Tomcat 
5.5/webapps/ncddos/cable/../flows/ncd_controller.js; line 110)
	at 
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:581)
	at 
org.mozilla.javascript.NativeGlobal.constructError(NativeGlobal.java:541)

at org.mozilla.javascript.NativeGlobal.typeError1(NativeGlobal.java:551)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1234)
	at 
org.apache.cocoon.generation.JXTemplateGenerator$JSIntrospector$JSMethod.invoke(JXTemplateGenerator.java:260)

at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:61)
	at 
org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:68)

at 
org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:50)
at 
org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:86)
	at 
org.apache.cocoon.generation.JXTemplateGenerator.getNode(JXTemplateGenerator.java:886)
	at 
org.apache.cocoon.generation.JXTemplateGenerator.getNode(JXTemplateGenerator.java:844)
	at 
org.apache.cocoon.generation.JXTemplateGenerator.execute(JXTemplateGenerator.java:2820)
	at 
org.apache.cocoon.generation.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:2495)
	at 
org.apache.cocoon.generation.JXTemplateGenerator.generate(JXTemplateGenerator.java:2486)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:578)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:779)
	at 
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:412)
	at 
org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:100)
	at 
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:320)
	at 
org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:126)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:578)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:183)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:480)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:46)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:142)
	at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68)
	at 
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:234)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.handleCocoonRedirect(ConcreteTreeProcessor.java:298)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.access$000(ConcreteTreeProcessor.java:47)
	at 
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor$TreeProcessorRedirector.cocoonRedirect(ConcreteTreeProcessor.java:339)
	at 
org.apache.cocoon.environment.ForwardRedirector.redirect(ForwardRedirector.java:59)
	at 
org.apache.cocoon.components.flow.AbstractInterpreter.forwardTo(AbstractInterpreter.java:209)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_JavaScriptInterpreter.forwardTo(FOM_JavaScriptInterpreter.java:906)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.forwardTo(FOM_Cocoon.java:698)
	at 
org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon.jsFunction_sendPage(FOM_Cocoon.java:269)

at inv2.invoke()
at 
org.mozilla.javascript.FunctionObject.doInvoke(FunctionObject.java:523)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:438)
at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntim

Practical Demo of CForms?

2006-02-21 Thread Berin Loritsch
Is there anything out there that is a decent demonstration of AJAX and 
Cocoon Forms?  I'm looking for something that's a bit better of a 
tutorial than the online documentation.


Also, can anyone tell me whether the AJAX is compatible with IE 5.5?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scaling Cocoon to handle a heavy load

2006-02-07 Thread Berin Loritsch

David Bishop wrote:

Hi,

Two weeks ago I asked for help regarding Cocoon performance.

I was pointed in the direction of the JVM as I was running 1.4.2, I 
upgraded this to 1.5.0_05 which basically has better garbage 
collection management and it proved to be a great improvement of 
stability and performance. Even under duress my test server gracefully 
slowed down, not crashed and burned like before!


This change has been made live and all is well site is performing 
beautifully and much quicker.


Many Thanks, for the advice, greatly appreciated!!

David.


Thanks for the feedback--I was wondering how things turned out for you.  
I'm glad everything is working well for you.


This might need to be in a FAQ somewhere, I'll check with the dev community


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scaling Cocoon to handle a heavy load

2006-01-26 Thread Berin Loritsch

See if these links help you at all:

http://java.sun.com/docs/hotspot/index.html
http://www.javaworld.com/javaworld/jw-01-2002/jw-0111-hotspotgc.html
http://developer.apple.com/documentation/Java/Reference/Java14VMOptions/VM_Options/chapter_2_section_6.html
http://performance.netbeans.org/reports/gc/
http://edocs.bea.com/wls/docs61/perform/JVMTuning.html

I would play around with some of the more fine controlled JVM settings.

Berin Loritsch wrote:
Let me find the link that might be able to help you.  This is not 
necessarily a Tomcat/Cocoon issue--it has to do with Java's memory 
management.  You will get OutOfMemoryErrors even when you haven't 
exceeded the -Xmx2048m command with sufficient load.


The problem has to do with the generational garbage collection that 
Java itself has.  Basically, your memory is divided up into 
buckets--if any of them fills up then you get an OutOfMemoryError 
thrown.  Under normal use, there is no problem.  The JVM has plenty of 
time to move stale object references from one GC bucket to the next.  
In a web environment, you can experience peaks that might 
instantaneously throw you over the edge.


There is a JVM setting that you can use to increase the bucket sizes 
for the generational garbage collection buckets, and that's what I 
would need to find the link to.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Scaling Cocoon to handle a heavy load

2006-01-26 Thread Berin Loritsch
Let me find the link that might be able to help you.  This is not 
necessarily a Tomcat/Cocoon issue--it has to do with Java's memory 
management.  You will get OutOfMemoryErrors even when you haven't 
exceeded the -Xmx2048m command with sufficient load.


The problem has to do with the generational garbage collection that Java 
itself has.  Basically, your memory is divided up into buckets--if any 
of them fills up then you get an OutOfMemoryError thrown.  Under normal 
use, there is no problem.  The JVM has plenty of time to move stale 
object references from one GC bucket to the next.  In a web environment, 
you can experience peaks that might instantaneously throw you over the edge.


There is a JVM setting that you can use to increase the bucket sizes for 
the generational garbage collection buckets, and that's what I would 
need to find the link to.


David Bishop wrote:

Hello,

I am hosting a website for a european project which hosts a number of 
complicated database driven questionnaires on genetic testing the site 
receives high peaks of usage and around 5000 visits, 200'000 hits per 
month. The entire site is written in cocoon and I am having problems 
in that during peak usage cocoon starts to return blank pages and 
errors appear in the log from normally error free, the server begins 
after that point to degrade in performance and Tomcat ends up 
returning java.lang.OutOfMemoryError errors.


The live server setup is

Linux Fedora Core 2
Apache Cocoon 2.1.6
Apache Tomcat 5.0.28
Java 1.4.2_07
PostgreSQL 7.4.7

The hardware of the live server is a Quad Xeon 3.0 with 2Gb RAM

Replicating the server locally and hitting the site with Siege I am 
able to bring the server down in a similar fashion using 15 concurrent 
users after 10 minutes. Hitting one error free page which takes around 
1 second to render on a server with no load.


The page is an aggregation of sitemap matches which run no more than 5 
deep in sitemaps and has a number of XSP's which access a PostgreSQL 
database using ESQL for various bits of the page, things start to go 
nasty when the page response time drops to around 30 seconds.


The Cocoon build however is only core blocks and there is nothing 
fancy in the code just ESQL, XSP and XSL using the default transformer.


I have tried playing with pool sizes
I have tried upgrading to Cocoon 2.1.8 which had little effect on 
performance, but much nicer error pages :-)
I have tried upgrading to Apache Tomcat 5.5.12 with Java 1.5.0_06 
which had a good effect on performance but still the site falls over 
at about 30 concurrent users.


Although I had to go back to Cocoon 2.1.6 as I got xspAttr errors with 
Cocoon 2.1.8 and Tomcat 5.5.12, any clues on this would also be 
appreciated!


What I don't understand as I am running out of ideas and depth of 
knowledge, is how to get better performance, I have set Java with the 
parameter to -Xmx2048M but tomcat doesn't take any than around 200Mbs.


What I would love is some advice as to what to try next?

- should I look at running multiple instances of tomcat?

Any advice would be greatly appreciated,

David.

David H Bishop
Waypoint Systems Ltd

Cocoon Error
---
FATAL_E (2006-01-20) 19:19.38:590   [core.xslt-processor] 
(/cocoon/egtorg/web/db/keyword/163/index.xhtml) 
http-8080-Processor8/TraxErrorHandler: Error in TraxTransformer: 
javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException: -1
javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException: -1
at 
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1276) 

at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3372) 

at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:433) 

at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55) 

at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:562) 

at 
org.apache.cocoon.sitemap.ContentAggregator.generate(ContentAggregator.java:134) 

at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:258) 

at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:468) 

at 
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120) 

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:68) 

at 
org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:31) 

at 
org.apache.cocoon.components.treeprocessor.CategoryNode.invokeByName(CategoryNode.java:62) 

at 
org.apache.cocoon.components.treeprocessor.sitemap.CallNode.invoke(CallNode.java:109) 

at 
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNod

Re: components not as factory or pooled

2005-11-22 Thread Berin Loritsch

Joerg Heinicke wrote:


On 21.11.2005 13:17, Iacturus wrote:


As the NonThreadSafeComponent uses some API which cannot be made
threadsafe, there can only be one method of NonThreadSafeComponent
executed at one time. I cannot change this API and it really has to be
used exclusively.



Why don't you make your NonThreadSafeComponent thread safe? In the 
easiest case just add "synchronized" to each method. To assure that it 
is a singleton you have to implement ThreadSafe then.



Oooh, that's dangerous advice.  There are two incredibly huge reasons 
why you shouldn't just blindly add "synchronized" to each method:


1. You pay an enormous price in synchronization overhead.  As all the 
threads contend for the monitor, you are limiting only one client to 
have access to the component at a time.  Sometimes it pays to have an 
instance per thread, or an instance per request to avoid monitor contention.


2. Blindly adding synchronized does not protect you from race 
conditions.  Take for instance a Queue situation.  One thread waits 
until the Queue says it has an item available polling the "size()" 
method--access is synchronized by the way.  Another thread steals the 
instance before the first thread has a chance to pop the item off.  The 
first thread's code dies because it assumed there would be something 
available.


I realize the last example was contrived, but it was to show that if you 
are relying on methods being called in a certain order you can't rely on 
that order in a multithreaded environment--even if the individual 
methods are synchronized.


The way around that is to use a token for the thread's "session" with 
the component.  That token would hold whatever state is necessary for a 
particular thread's conversation with the component.


Point is, you have to plan for concurrent access, you can't just add the 
synchronized keyword to a method signature.  You realize that by doing 
that the synchronization object is the whole object that the method 
belongs to?  Typically there are only a couple objects that really need 
synchronization around them within the parent object, so you can 
minimize thread contention by only synchronizing on the parts that 
really need to be synchronized.  That minimizes the time spent in 
monitor contention mode.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: components not as factory or pooled

2005-11-18 Thread Berin Loritsch

Iacturus wrote:

That's the mechanism currently used to flag whether a component is to 
be treated as a singleton.  Why wouldn't it be possible?



The problem is, that i need to have exclusive access on object 
(component) level.
Using the Threadsafe interface will cause the need of java 
synchronization:


synchronized (myComponent) {
myComponent.doSomething1();
myComponent.doSomething2();
}

This is in any case a bottleneck, but i intended to delegate this to 
the component manager.
My component is not thread safe and it is not possible to make it 
thread safe.




Ok, I'm a little confused now.  I thought you asked how to make 
something a singleton--which is what I shared.  Now you are saying that 
is not really what you need.


Without having any more details, I'm not sure how I can help you out 
further.  If you can help me understand a bit better what it is you 
need, I can help you find a solution.  Is it possible to use the actual 
code itself or is that an NDA or corporate secret?  If not, can you get 
as similar as you possibly can without violating your employer's trust?  
I suspect that you may need another component to do aggregate work, or 
something of that nature.  I'm not sure.  When everything is called 
"component" its hard to understand what you are really trying to accomplish.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: components not as factory or pooled

2005-11-18 Thread Berin Loritsch

Iacturus wrote:


Hi,

No, they have not. It is also not possible to do this.



That's the mechanism currently used to flag whether a component is to be 
treated as a singleton.  Why wouldn't it be possible?


I know it might be kludgy, but you may have to create a subclass of the 
component implementing the ThreadSafe interface if you can't touch the 
original components for some political reasons.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: components not as factory or pooled

2005-11-18 Thread Berin Loritsch

Iacturus wrote:


Hi,
 
i have some components in my cocoon.xconf like this one:
 

class="MyComponent"
role="MyComponent.Role"
logger="MyComponentLogger">

 
Now i want cocoon to have just one Instance of this component. No 
Pooling, no Factory.

Is this possible? If yes, how?
I'm using cocoon 2.1.7. at the moment, maybe 2.1.8 later.
 
Sorry for my bad english.

I hope you can help me.


Have your component implement the 
org.apache.avalon.framework.thread.ThreadSafe interface.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unicode Support

2005-10-31 Thread Berin Loritsch
On Monday 31 October 2005 6:40 am, Abbas Mousavi wrote:
> Yes FOP supports unicode, but it seems that it dont support right to left
> scripts or right to left layout. it desplays arabic or hebrew glyphs in
> reverse order (in generated PDFs) and arabic or hebrew words in reverse
> order (in AWT view).
>
> 

Snap!

You know, I have to support predominantly English with references to other 
languages--so I never tested alternate text layouts.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unicode Support

2005-10-27 Thread Berin Loritsch
On Thursday 27 October 2005 1:55 pm, Venkat wrote:
> Hello, I am Venkat and I am new user of Apache Cocoon. In one of the
> projects we are planning to use Cocoon to automatically generate PDF
> files from XML input and XSL FO page layout  description.
>
> Can some one please confirm if this feature (XML to PDF conversion) of
> Apache Cocoon support generating PDF files in Unicode Support (Does it
> have unicode support..?) ? I see a jar files that support unicode in the
> distribution...
>
> I appreciate your help.

I can confirm it definitely.  You do have to ensure everything in your 
pipeline that might interpret streams is marked for UTF-8, but it works fine.

The biggest problem you will run into is font support.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Writing my own generator.

2005-10-18 Thread Berin Loritsch

Aurélien DEHAY wrote:


Hello.
I've just discovered 
http://cocoon.zones.apache.org/daisy/documentation/g2/610.html



Did you discover this:

http://cocoon.zones.apache.org/daisy/documentation/g2/688.html

?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



XSP Issue

2005-08-15 Thread Berin Loritsch
XSP is not recognizing sitemap parameters like JXTL is.  The call to 
parameters.getParameter("mrn", "") should return a result when that 
parameter is set in the sitemap.  The corresponding call with JXTL works 
well, but not in the XSP.  Its as if the paremeters is cleared all the time.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: OT: Suse

2005-08-11 Thread Berin Loritsch

Christoph Hermann wrote:


I didn't want to, thats why i didn't write it ;-)
Suse is, lets say "stubborn" in some cases, and very coloured and 
"user-friendly" (imho).
 



 Oh man, what a slam!  Something's user friendly--it must be bad!


Honestly, when something works well and you don't have to think too hard 
about stuff you shouldn't be thinking hard about--then its not bad.


From a linux system i expect to know what it does all the time, with Suse i do 

not have that feeling. Hope this explains my opinion a little better.
 



And this is the real underlying problem: user expectation doesn't meet 
user experience.  If you are new to Linux, Suse is not bad.  If you are 
an experienced Linux user, then Suse does some things a little 
differently than most of your standard distributions.  Last time I 
played with Suse (I admit it was a few years ago), it was one of the 
nicest packages.  For one thing the paper manual shipped with it was top 
notch.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Migrating Cocoon from OS X (10.4.2) to Linux (SuSe Pro 9.3)

2005-08-11 Thread Berin Loritsch

Uzo Andrew Madu wrote:


What are the major pitfalls I should watch out for when doing this?



The only pitfalls you might encounter would be those related to explicit 
paths.  If all your document references are within the context that 
Cocoon lives within (the most common case), then the same app will work 
on Windows, Linux, Solaris, Mac, etc.  There really aren't any major 
pitfalls unless you knowingly used proprietary features of the 
underlying platform.


Although you might have to live with better performance due to Mac's JVM 
not being optimized with HotSpot.  But I think that's a cross we'd all 
be willing to bear...



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cocoon and linux

2005-08-10 Thread Berin Loritsch

Uzo Andrew Madu wrote:


Hi,
I have decided to do away with Microsoft 2000 server and am now  
planning to install SUSE LINUX Professional 9.3 from Novell on my  
machine. Can someone please tell me:


1. Will Cocoon run on Linux?
2. Is SUSE a good version of Linux?



Yes and Yes.

SUSE, Redhat, Debian, and Fedora Core are all good brands to use.  There 
are several distributions to choose from, and the main differences are 
in the packaged apps, hardware support, and admin features.  If you know 
the command line way of doing things the differences between them all 
get boiled down to RPM vs Deb packaging formats and how to install what 
you need.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can't get XSP page output to encode as UTF-8

2005-08-10 Thread Berin Loritsch
On Tue, 2005-08-09 at 23:19 -0700, BoBo C wrote:
> Hi-
> I've got an XSP page running under Cocoon 2.1 on a Linux machine that is 
> accessing a MySQL
> database. I'm placing the query return values (the  column="xx"/> elements)
> between hardcoded XML begin and end tags, forming an XML document.  Although 
> I'm specifying:
> -
> 
>xmlns:xsp="http://apache.org/xsp"; 
>   xmlns:xsp-request="http://apache.org/xsp/request/2.0"; 
>   xmlns:esql="http://apache.org/cocoon/SQL/v2"; language="java">
> -
> at the top of the XSP page, the output it produces is encod
> BBC
> 
> 
>   
> 
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] as: 
> "".  
> I need it to be UTF-8.  The output is intended to be an XML file for further 
> transformation in the
> pipeline.  I can't figure out where in sitemap.xmap or in t
> BBC
> 
> 
>   
> 
> Start your day with Yahoo! - make it your home page 
> http://www.yahoo.com/r/hs 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED] XSP page itself to ensure 
> that the
> output encoding is UTF-8...
> 
> Thanks

What's your serializer set for?  That's what determines what gets sent
to the client.  The UTF-8 in the source lets the XML parser know how to
read what you have.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: expected behaviour: global vars in flowscript

2005-08-03 Thread Berin Loritsch

Leszek Gawron wrote:

If you are trying to apply MVC here you're failing. You should not be 
calling pages/displayHome.xsp but some displayHome flowscript function.


The flowscript function prepares the bean and does cocoon.sendPage( 
"pages/displayHome" ) which is matched to:


> 
> 
> 
> 
> 
> 
> 

> 
> 
> 
> 

It means:

1. you invoke the controller
2. the controller performs business logic and prepares data for view
3. with cocoon.sendPage you call your view

In your case it is all pretty mixed up.



So how would you fix it, assuming we wanted to aggregate different 
pieces into one page?  Those peaces are used elsewhere in the program.  
Your comments weren't particularly helpful to either point to the 
specifics of how to expect flowscript to work or how to correct the code 
as it is.


Seon's on my team, so I have a vested interest in getting this issue 
resolved.


--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

  -- Steve Jobs



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: SQLTransformer makes Cocoon hang under high load

2005-06-30 Thread Berin Loritsch

Fabrizio Sitzia wrote:

Hello,

I'm developing a dynamic Cocoon webapp that performs a lot of (nested) queries
using the SQLTransformer.

The SQLTransformer performs SELECT operations only, and it is configured to
use a JDBC database connection pool that is managed by Cocoon itself.
Excerpt from cocoon.xconf:

  

  
  ...

  


At some point, I decided to stress-test the webapp using the 'ab'-tool (Apache
benchmark) to simulate a large number of concurrent requests.

When the number of concurrent requests is heading towards the 'max' number of
pooled database connections, the following occurs:

- The 'ab' benchmark is aborted with a timeout error.

- Using a database monitoring tool, you will notice that the 'max' number of
pooled database connections have been left open.

- Cocoon 'hangs' indefinitely!
Any further requests to the webapp will timeout, and nothing gets written to
the logs (access.log, error.log...)
There are no warnings, nor any error messages in the logs that would indicate
why the hang occured in the first place. Up to the hang, everything appears to
run normally!

That's scary!


It sounds like SQLTransformer naively gets a new connection per query. 
This in turn requires that if your page has 4 nested queries then 
SQLTransformer is using 4 of your 50 connections.  It only takes 13 
simultaneous requests to use up all the connections at that rate, and if 
all your requests have anywhere between 1 and 3 connections reserved and 
are not finished yet, none of the pages will release the connection and 
a deadlock occurs.  If you have as many as 10 nested queries it is 
obvious to see how something like this could occur.


I think the ESQL logicsheet suffered from this many moons ago, but 
resolved it by requesting one connection per page.  BTW, Microsoft's 
feeble driver is limited to one connection per query--so your choice is 
to use jTDS or some other company's version.


Nonetheless, it seems like there is a bug in SQLTransformer.  Submit a 
bug report, and hopefully it can get resolved.


--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Accessing cocoonbean from apache axis

2005-06-30 Thread Berin Loritsch

Upayavira wrote:

karusala kiranbabu wrote:


Hi ,
 we r using the axis -1.2 ,cocoon-2.1.7,jboss-4.x on
windows.
  we require some information regarding cocoonbean i.e how to call 
cocoonbean from the axis.



Why do you want to do this? What are you trying to achieve?

Regards, Upayavira


I know i want to be able to have Cocoon handle the request/response for 
webservices, but Axis provides better plumbing than Cocoon for now.  I 
wouldn't mind having a way to call a Cocoon pipeline to return the 
response to the user.


--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: connection pool fail over

2005-06-29 Thread Berin Loritsch

Rui Alberto wrote:

Hi,
I have three replicated databases and a connection pool to each database
instance. 
The network to database instances is a little unstable, so I want to

check at least one connection in the pool before passing pool identifier
to SQLTransformer. If connection is broken, I wanna try next other pool.
Does anyone know if there's a simple way to handle this situation?
Should I write a selector, or an input module maybe or an action?! 
Writing a selector or action implies an exhaustive sitemap! :|


Any idea?


Commercial database driver vendors include such a feature.  Both 
DataDirect (produce enhanced drivers for SQLServer, Oracle, Informix, 
and others) and JNetDirect (produce enhanced drivers for SQLServer) have 
round-robin database failover.  Essentially as soon as the 
javax.sql.DataSource they have determines a pooled connection has gone 
bad, it will create a connection from the next database in the list.


You would just need to use the J2EEDataSource component in Cocoon to 
connect to it.


There is a caveat with the commercial database driver vendors: price. 
If you are using BEA WebLogic or IBM WebSphere, you are already using 
the latest DataDirect drivers and that is built into the price of the 
license.


We opted for JNetDirect on our current project because for reasons 
beyond us we had to work with SQLServer.  The drivers from Microsoft are 
4 years old and they have no intention of updating them.


--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TDD with Cocoon?

2005-06-23 Thread Berin Loritsch

Bertrand Delacretaz wrote:


I tend to use a mix of three methods:
a) plain JUnit test cases for code which has nothing to do with Cocoon 
(primitives, etc.)


This one's a gimme.

b) JUnit test cases which run in a Generator, for higher-level tests 
which need access to more of the application's environment


Now, how does this work?  Do you have an example of that?


c) HtmlUnit-based tests cases like the ones found in src/test/htmlunit/

I know these are not all strictly "unit" test cases, but I find the 
combination powerful.


And I thank you for that.

Hmm, an area for Cocoon's Wiki maybe on unit testing?

--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TDD with Cocoon?

2005-06-23 Thread Berin Loritsch

After a quick google, I discovered the following links:

HTMLUnit Testing of Cocoon
http://www.codeconsult.ch/bertrand/archives/000496.html

jWebUnit

And the ASF Bugzilla report
http://issues.apache.org/bugzilla/show_bug.cgi?id=34294

Wojciech Biela wrote:

On 6/23/05, Berin Loritsch <[EMAIL PROTECTED]> wrote:


Coming from a TDD background, I want to extend that into developing with
Cocoon.  The only problem is that I'm not sure how to go about doing it.



not long ago I asked the a similar question on this list, but sadly
didn't get much helpful tips, guess TDD's not common for the Cocoon
community .. or the ones that do it have no time to answer .. :) (if
they do, I would be very encouraging if they wrote something, or at
least told us we're "you're not alone").

AFAIC the java components can be TDD'ed normally using the excalibur
testcases etc,

my main concerns we're about flowscript and it's testability at unit
level. The answer I on the list was using JavaFlow, but I was afraid
to use it as it was still unstable (though I know Bertrand said it's
stable already - if it's stable why to people insist on using
flowscript which is a whole lot more error prone),

for testing the glue that binds everything together there was a
project called CoUnit, presented at the GT2004, but at the
presentation time it was still very much user construction, and I
haven't heard since of any major steps forward, it is supposed to test
the sitemap pipelines statically (through XSLT)

hope that helps you get the idea of how things are, I'd be happy to
hear I'm wrong or my info is out of date

If you or anybody else comes up with any bright ideas in this field,
don't forget to report it to this list.

I'd also be willing to do something to help the subject, just don't
have any ideas right now.




--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TDD with Cocoon?

2005-06-23 Thread Berin Loritsch
Coming from a TDD background, I want to extend that into developing with 
Cocoon.  The only problem is that I'm not sure how to go about doing it. 
 What is available to help test logicsheets, transformers, etc?


Quick turn around with trial and error is nice, but what we are missing 
is the ability to catch regression issues.  Thats what a test suite is for.


What's the best approach to do testing with Cocoon?

--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: static method to get a component?

2005-06-09 Thread Berin Loritsch

Ben Anderson wrote:

Hi,
I need to hit the database from outside of cocoon, but within the same
webapp.  I would like to share the same datasource.  My first thought
was to follow this example:
http://cocoon.apache.org/2.1/developing/datasources.html
which is to implement the Composable interface.  However, I'm not sure
how to do this because I'll need a static hook somewhere to get my
object.  Does anyone have any pointers for doing this?
Thanks,
Ben


Adding a static hook is less than ideal, and it isn't hard to just 
create your system to live as a component inside of the Cocoon world.


Nevertheless, if you are hell-bent on this approach, here is how you 
would do it:


http://cocoon.apache.org/2.1/developing/parent-component-manager.html

Set up the component manager in your static class, with the entry for 
the database, and let cocoon just use it.


--
Design is a funny word. Some people think design means how it looks.
But of course, if you dig deeper, it's really how it works.

   -- Steve Jobs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Remote Portlet Spec?

2005-05-24 Thread Berin Loritsch
Would there be some interest in defining a "remote portlet" spec?  I 
have a need to provide portlet functionality but have all work done on a 
separate server.  The remote portlet spec would define how a portal 
server would interact with a remote server to handle incorporating 
information.


Essentially I would like a solution that does not require you to 
distribute a WAR file containing portlets to include in someone else's 
server.  I have to maintain information that is proprietary to our back 
end and right now our only solution is to use an IFRAME to embed 
ourselves into the portal solution.  Its not an ideal thing.


--

"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."

Alistair Begg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Any blocks for JSR-168 packaging?

2005-05-19 Thread Berin Loritsch
I need to provide portlet content to an app, and I would like to use a 
JSR-168 compliant solution for interoperability.

--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: anyone else experience the build error that Brenda did?--problem solved

2005-05-17 Thread Berin Loritsch
Upayavira wrote:
Tran, Brenda wrote:
I removed my environment variables ANT_HOME and ANT_OPTS and it worked.
Thanks,

In which case, there's a bug in the build script, as those variables 
shouldn't influence the build process, IMO.

Those are part of the ANT build script, which I don't think the Cocoon 
version is too different from that.  Perhaps the build.bat/build.sh file 
should export ANT_HOME={location of cocoon ant} and ANT_OPTS={nothing}. 
 That might be able to make everything be isolated.

--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: anyone else experience the build error that Brenda did?

2005-05-13 Thread Berin Loritsch
Berin Loritsch wrote:
Berin Loritsch wrote:
I downloaded it and everything built ok for me, but it does have me 
concerned a bit.  She is a coworker of mine, and I'm not sure what is 
different between the machines that we have but there is clearly a 
problem.

If someone else has run into a similar issue could you throw a heads 
up?  I suspect it may be an XML related issue.  The question is of 
course where is it?  I believe she has the web services pack installed 
on her machine from Sun.  Could that have messed up her environment?

Oh, here's one difference:  I'm running Java 5.
Let me switch my environment to Java 4 and see if I still have issues.
Ok, its still working...
Brenda, try uninstalling Sun's Web Services Development Kit and 
reinstalling Java to make sure no stray jars are littering your 
classpath.  I have a feeling that there is a conflict between the WSDK 
and Cocoon.  That should get Cocoon 2.1.7 to work.

--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: anyone else experience the build error that Brenda did?

2005-05-13 Thread Berin Loritsch
Berin Loritsch wrote:
I downloaded it and everything built ok for me, but it does have me 
concerned a bit.  She is a coworker of mine, and I'm not sure what is 
different between the machines that we have but there is clearly a problem.

If someone else has run into a similar issue could you throw a heads up? 
 I suspect it may be an XML related issue.  The question is of course 
where is it?  I believe she has the web services pack installed on her 
machine from Sun.  Could that have messed up her environment?

Oh, here's one difference:  I'm running Java 5.
Let me switch my environment to Java 4 and see if I still have issues.
--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Small issue with samples in 2.1.7

2005-05-13 Thread Berin Loritsch
In the "Hello, World" sample, the incorrect mime-type is associated with 
the http://localhost:/samples/hello-world/hello-worldml.doc sample. 
 It is currently "text/xml", and it should be "x-application/word".  As 
a result it simply is rendered as an XML document in both Exploder and 
Firefox.

--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


anyone else experience the build error that Brenda did?

2005-05-13 Thread Berin Loritsch
I downloaded it and everything built ok for me, but it does have me 
concerned a bit.  She is a coworker of mine, and I'm not sure what is 
different between the machines that we have but there is clearly a problem.

If someone else has run into a similar issue could you throw a heads up? 
 I suspect it may be an XML related issue.  The question is of course 
where is it?  I believe she has the web services pack installed on her 
machine from Sun.  Could that have messed up her environment?

--
"In socialism man exploits his fellow man;
 whereas in capitalism the reverse is true."
Alistair Begg
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]