Re: Tapestry Bamboo Site

2007-02-19 Thread Jiri Mares

Hi Howard,

that's great, but if you try to view tests for Tapestry4 you get OutOfMemory 
exception :-(

Howard Lewis Ship napsal(a):
 
 Thanks to the great folks at Formos, Tapestry now has continuous
 integration.
 
 Surf on over to http://tapestry.formos.com/bamboo/ to see the current
 status of the T5 builds.  I expect we'll be adding in the T4 builds as
 well.
 
 This is a great way to see the progress of Tapestry over time and
 track the changes that have been occuring.
 

-- 
Jiří Mareš (mailto:[EMAIL PROTECTED])

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



Re: Tapestry 5-IoC will support Hivemind?

2007-02-19 Thread Dmitriy Vsekhvalnov

Glad to here it is easy.

You know, will be happy to use new Tap5-IoC, but we are using HiveMind as
microkernel for whole product (server part and ui part), not only as service
container for Tapestry. So we don't want to change it, but we'll want to
migrate to Tap-5 someday.

On 2/18/07, Massimo Lusetti [EMAIL PROTECTED] wrote:


On 2/16/07, Dmitriy Vsekhvalnov [EMAIL PROTECTED] wrote:

 Hello,

  will Tapestry 5 support hivemind integration? I.E. will it be able to
 inject HiveMind services to the Tapestry5  pages?

   And if so, is it possible to make Registry instance to use to be
 configurable? I mean to provide externally instantiated Registry to
Tapestry
 5 to inject services from?

I've already done that and useing this in a running prototype and yes,
it was dead simple.

--
Massimo
http://meridio.blogspot.com

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




Creating AbstractComponent with .script

2007-02-19 Thread Kristian Marinkovic

Hi all,

maybe a dumb question... but how do i force
an AbstractComponent to render the injected
script?

I could not figure out how to obtain the instances
required to call getScript.execute(..objects?..).


this is what i have so far:
@InjectScript(CompWithScript.script)
public abstract IScript getScript();

@Override
protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {
   writer.begin(div);
   // stuff
   writer.end();

   // produces NPE
   //getScript().execute(this, cycle, new DefaultResponseBuilder(writer),
java.util.Collections.EMPTY_MAP);
}

g,
kris


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



Re: Creating AbstractComponent with .script

2007-02-19 Thread Shing Hing Man
Try to put something like the following at end
of your rendercomponent method. 


PageRenderSupport pageRenderSupport = TapestryUtils
.getPageRenderSupport(cycle, this);

Map symbols = new HashMap();
symbols.put(colorPicker, this);

_script.execute(cycle, pageRenderSupport, symbols);


Shing

--- Kristian Marinkovic
[EMAIL PROTECTED] wrote:

 
 Hi all,
 
 maybe a dumb question... but how do i force
 an AbstractComponent to render the injected
 script?
 
 I could not figure out how to obtain the instances
 required to call getScript.execute(..objects?..).
 
 
 this is what i have so far:
 @InjectScript(CompWithScript.script)
 public abstract IScript getScript();
 
 @Override
 protected void renderComponent(IMarkupWriter writer,
 IRequestCycle cycle) {
writer.begin(div);
// stuff
writer.end();
 
// produces NPE
//getScript().execute(this, cycle, new
 DefaultResponseBuilder(writer),
 java.util.Collections.EMPTY_MAP);
 }
 
 g,
 kris
 
 

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


Home page :
  http://uk.geocities.com/matmsh/index.html





___ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at 
the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 

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



AW: My crap development environment

2007-02-19 Thread Holger Stolzenberg
Oh din not know that I will give it a try!!

-Ursprüngliche Nachricht-
Von: Joe Trewin [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 16. Februar 2007 11:15
An: Tapestry users
Betreff: RE: My crap development environment

Don't forget that if you launch your web app in debug mode from Eclipse (and 
probably other IDEs) with Jetty (and maybe Tomcat?) then *most* minor code 
changes, particularly to pages/components etc will be picked up automatically 
without a server restart. Eclipse will complain when it can't.

So even if you're not debugging it's often useful to launch in debug mode, 
depending on which part of your system you're developing.

 -Original Message-
 From: Holger Stolzenberg [mailto:[EMAIL PROTECTED]
 Sent: 16 February 2007 08:55
 To: Tapestry users
 Subject: AW: My crap development environment
 
 I think the WTP approach with the temporary tomcat installation is 
 very good because you can defined which projects should be started 
 with this tomcat, if you use one tomcat with sysdeo then all webapps 
 will always be starte.
 
 
 -Ursprüngliche Nachricht-
 Von: Kalle Korhonen [mailto:[EMAIL PROTECTED]
 Gesendet: Donnerstag, 15. Februar 2007 20:39
 An: Tapestry users
 Betreff: Re: My crap development environment
 
 Sysdeo's plugin is no silver bullet, but I keep evaluating 
 alternatives and so far I haven't found anything better. The most 
 common gotchas with Sysdeo is installing devloader (which you will 
 need) and maintaining the set of libraries to load (for which 
 sysdeo-tomcat-plugin is used), setting the context path correctly and 
 making sure you don't have servlet-api loaded with the devloader. I 
 have developers asking about these over and over again.
 
 Kalle
 
 On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
 
  I'll have to try the sysdeo plugin again. I used to use it
 but at some
  point I decided I preferred the WTP plugin (I don't quite
 remember now
  the reason). In any case, it's very possible it takes 45 seconds in 
  the initial build/publish  if he has a slow disk or a large set of 
  libraries to copy over. After the initial build, however, it should 
  take a second or so to copy over any incremental changes
 (that's why I
  think he has an incremental builder problem).
 
 
 
  On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
   Oh ok. Yea I never understood why WTP went with that approach. 
   There's
  gotta
   be some file locking issues though if that takes 45 seconds - 
   luckily
  I'm on
   Linux so I don't care. I use Sysdeo's Tomcat plugin that runs 
   everything in-place (I have Jetty as well but don't see much of a 
   difference in performance either way). And now with Discursive's 
   sysdeo-tomcat-plugin
  it's
   ah all so nicely automated.
  
   Kalle
  
   On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
   
When using eclipse Web Standard Tools, eclipse sets up
 a temporary
Tomcat (or other app server) directory with
 configuration and your
project files. Tomcat is then started from this
 directory. This is
done so you can have more control of when your changes
 appear in
Tomcat. You can have it set so every time it detects changes in 
your build it copies the affected files to the temporary 
directory, or you can have it so you publish manually
 (For example
I have auto-build enabled so I don't necessarily want tomcat 
restarting every time it detects a change, so I publish
 manually
after I have made the set of changes I want). So basically 
Publishing involves just synchronizing the files tomcat sees 
with the contents of your eclipse biuld directory.
   
On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
 Just out of interest, what's this publishing step? 
 Compilation
 is
  the
only
 thing and occasional re-load of the context when hotswapping 
 fails
  (like
it
 does with Tomcat most of the time)  that should be
 required. If
 you
  do
 something else, I think you haven't set up your environment
  correctly
for
 development.

 Kalle

 On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:
 
  I really don't think the Jetty plugin is going to solve his 
  performance problems. Jetty might or might not be
 faster but
  in
  any
  case, not significantly enough to solve his problem. I am 
  willing
  to
  bet that his problem is due to an incremental compile issue 
  where
  his
  entire project is re-compiled every time he saves one file. 
  He's talking about 60 seconds before the server even begins 
  starting
  up. I
  had this issue while using the AJDT plugin in
 combination with
  Maven
  because maven uses 2 output directories by default (one for 
  the
  test
  classes) and AJDT didn't handle this properly triggering a
  complete
  rebuild. There is no reason it should take 15
 seconds to SAVE
  an
  .html
  file 

Re: Re: Creating AbstractComponent with .script

2007-02-19 Thread Kristian Marinkovic
thank you very much...

g,
kris


   
 Shing Hing Man
 [EMAIL PROTECTED] 
   An 
Tapestry users 
 19.02.2007 11:42   users@tapestry.apache.org
 Kopie 
   
  Bitte antwortenThema 
an  Re: Creating AbstractComponent 
 Tapestry users   with .script   
 [EMAIL PROTECTED] 
pache.org 
   
   
   
   




Try to put something like the following at end
of your rendercomponent method.


 PageRenderSupport pageRenderSupport = TapestryUtils

.getPageRenderSupport(cycle, this);

 Map symbols = new HashMap();
 symbols.put(colorPicker, this);

 _script.execute(cycle, pageRenderSupport,
symbols);


Shing

--- Kristian Marinkovic
[EMAIL PROTECTED] wrote:


 Hi all,

 maybe a dumb question... but how do i force
 an AbstractComponent to render the injected
 script?

 I could not figure out how to obtain the instances
 required to call getScript.execute(..objects?..).


 this is what i have so far:
 @InjectScript(CompWithScript.script)
 public abstract IScript getScript();

 @Override
 protected void renderComponent(IMarkupWriter writer,
 IRequestCycle cycle) {
writer.begin(div);
// stuff
writer.end();

// produces NPE
//getScript().execute(this, cycle, new
 DefaultResponseBuilder(writer),
 java.util.Collections.EMPTY_MAP);
 }

 g,
 kris



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




Home page :
  http://uk.geocities.com/matmsh/index.html





___
New Yahoo! Mail is the ultimate force in competitive emailing. Find out
more at the Yahoo! Mail Championships. Plus: play games and win prizes.
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk

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




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



Help with AbstractFormComponent

2007-02-19 Thread Andrea Chiumenti

Hello,
I'm having the follogin problem:

I'm creating a FormComponent that inherits from AbstractFormComponent.
My component has some input components inside and then behaves like a @For.

When the method rewindFormComponent(IMarkupWriter writer, IRequestCycle
cycle) is called

the getSource()  and getEditIndex() are null while I expect them not to be
null at least for getSource().

The code is the following:

protected void rewindFormComponent(IMarkupWriter writer, IRequestCycle
cycle) {
   try
   {
   renderControlComponents(writer, cycle);
   setIndex(getSubmitIndex());
   setValue(getSource().get(getIndex()));
   renderBody(writer, cycle);
   // This is atypical validation - since this component does not
explicitly bind to an object
   getValidatableFieldSupport().validate(this, writer, cycle,
getValue());
   } catch (ValidatorException e) {
   setEditIndex(getSubmitIndex());
   getForm().getDelegate().record(e);
   }

   }

what shoud I do to have a correct rewindFormComponent behaviour ?

Thanks in advance,
kiuma


Re: Record locking

2007-02-19 Thread James Carman

You can use optimistic locking.  When the user submits and they have
outdated data, then you just merge the object's data with what is in
the data store and show it back to the user for them to confirm it.

On 2/19/07, Murray Collingwood [EMAIL PROTECTED] wrote:

Hi

Jesse Kuhnert jkuhnert at gmail.com writes:
 hibernate.org

This is a rather simplistic answer, however I have been away and read the
documentation and am not convinced that this is providing a method that will
warn a user if somebody else if already updating a record.

Even this example of pessimistic locking appears to allow for previous data
changes to be overwritten:
http://forum.springframework.org/archive/index.php/t-10188.html

What would convince me?

An example of a read-for-update operation that returned a condition (or
exception) indicating that the requested object was currently locked by another
user.  I'm yet to find that in Hibernate.

Cheers
mc



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




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



T5: Spring Integration

2007-02-19 Thread SergeEby

Hi,

I know Spring integration will be included later in T5, but was wondering if
someone has already figured out how to do that.
I am playing around converting an existing application to T5.

Thanks,

/Serge
-- 
View this message in context: 
http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



method name of listener

2007-02-19 Thread Kristian Marinkovic

hi all,

is there a way to obtain the method name of a listener?

I need it to generate a javascript function with the same
name. calling this js function will trigger an asynchronous XHR
call (Tapestry.bind) that triggers the corresponding listener.
The js method also accepts parameters that get send to the page.

in case anyone else needs this very, very simple component
i'll post it somewhere.

g,
kris


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



Re: T5: Spring Integration

2007-02-19 Thread DJ Gredler

You can just inject the following into your pages:

   @Inject
   private ApplicationGlobals globals;

And then use the servlet context inside the globals object to get the
application context via

   WebApplicationContextUtils.getRequiredWebApplicationContext
(servletContext);

Once you have the application context, you just call getBean(String) to get
your managed beans.



On 2/19/07, SergeEby [EMAIL PROTECTED] wrote:



Hi,

I know Spring integration will be included later in T5, but was wondering
if
someone has already figured out how to do that.
I am playing around converting an existing application to T5.

Thanks,

/Serge
--
View this message in context:
http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
Sent from the Tapestry - User mailing list archive at Nabble.com.


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




Re: Tapestry Bamboo Site

2007-02-19 Thread Howard Lewis Ship

Yep, we're still working on that.

On 2/19/07, Jiri Mares [EMAIL PROTECTED] wrote:


Hi Howard,

that's great, but if you try to view tests for Tapestry4 you get OutOfMemory 
exception :-(

Howard Lewis Ship napsal(a):

 Thanks to the great folks at Formos, Tapestry now has continuous
 integration.

 Surf on over to http://tapestry.formos.com/bamboo/ to see the current
 status of the T5 builds.  I expect we'll be adding in the T4 builds as
 well.

 This is a great way to see the progress of Tapestry over time and
 track the changes that have been occuring.


--
Jiří Mareš (mailto:[EMAIL PROTECTED])

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





--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


Re: Tapestry Bamboo Site

2007-02-19 Thread James Carman

We're actually thinking of using Bamboo at work, so if you find that
this is a big issue, could you let the list (or me directly) know?  Is
it just a matter of starting the JVM with more heap memory?

On 2/19/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:

Yep, we're still working on that.

On 2/19/07, Jiri Mares [EMAIL PROTECTED] wrote:

 Hi Howard,

 that's great, but if you try to view tests for Tapestry4 you get OutOfMemory 
exception :-(

 Howard Lewis Ship napsal(a):
 
  Thanks to the great folks at Formos, Tapestry now has continuous
  integration.
 
  Surf on over to http://tapestry.formos.com/bamboo/ to see the current
  status of the T5 builds.  I expect we'll be adding in the T4 builds as
  well.
 
  This is a great way to see the progress of Tapestry over time and
  track the changes that have been occuring.
 

 --
 Jiří Mareš (mailto:[EMAIL PROTECTED])

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




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com




Update Tapestry 3 to 4.1.1

2007-02-19 Thread cedric . brajus
Hello,

I search french users because I want discuss about the migration 
tapestry 3 to 4.1.1(Active) I need know the impact because I have already 
develop jwc and I'mnot very good in english. So I take your help.

 
Cordialement - Best regards

BRAJUS Cédric
SETVAL-CTIV
http://www.ctiv.vallourec.fr/
Office : + 33 (0)3 27 22 76 67 
   Fax : + 33 (0)3 27 22 23 00

Re: T5: Spring Integration

2007-02-19 Thread James Carman

Of course, you have to set up the ContextLoaderListener, right?


On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:

You can just inject the following into your pages:

@Inject
private ApplicationGlobals globals;

And then use the servlet context inside the globals object to get the
application context via

WebApplicationContextUtils.getRequiredWebApplicationContext
(servletContext);

Once you have the application context, you just call getBean(String) to get
your managed beans.



On 2/19/07, SergeEby [EMAIL PROTECTED] wrote:


 Hi,

 I know Spring integration will be included later in T5, but was wondering
 if
 someone has already figured out how to do that.
 I am playing around converting an existing application to T5.

 Thanks,

 /Serge
 --
 View this message in context:
 http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
 Sent from the Tapestry - User mailing list archive at Nabble.com.


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





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



Re: T5: Spring Integration

2007-02-19 Thread DJ Gredler

Good catch :-)

You also have to add the following line to your web.xml:

listenerlistener-class
org.springframework.web.context.ContextLoaderListener
/listener-class/listener


On 2/19/07, James Carman [EMAIL PROTECTED] wrote:


Of course, you have to set up the ContextLoaderListener, right?


On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:
 You can just inject the following into your pages:

 @Inject
 private ApplicationGlobals globals;

 And then use the servlet context inside the globals object to get the
 application context via

 WebApplicationContextUtils.getRequiredWebApplicationContext
 (servletContext);

 Once you have the application context, you just call getBean(String) to
get
 your managed beans.



 On 2/19/07, SergeEby [EMAIL PROTECTED] wrote:
 
 
  Hi,
 
  I know Spring integration will be included later in T5, but was
wondering
  if
  someone has already figured out how to do that.
  I am playing around converting an existing application to T5.
 
  Thanks,
 
  /Serge
  --
  View this message in context:
  http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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




Re: T5: Spring Integration

2007-02-19 Thread James Carman

I think what is needed, though, is something that allows you to bind
spring beans directly into your page/components.  Having to lookup
spring beans all the time can be a pain.


On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:

Good catch :-)

You also have to add the following line to your web.xml:

listenerlistener-class
org.springframework.web.context.ContextLoaderListener
/listener-class/listener


On 2/19/07, James Carman [EMAIL PROTECTED] wrote:

 Of course, you have to set up the ContextLoaderListener, right?


 On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:
  You can just inject the following into your pages:
 
  @Inject
  private ApplicationGlobals globals;
 
  And then use the servlet context inside the globals object to get the
  application context via
 
  WebApplicationContextUtils.getRequiredWebApplicationContext
  (servletContext);
 
  Once you have the application context, you just call getBean(String) to
 get
  your managed beans.
 
 
 
  On 2/19/07, SergeEby [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   I know Spring integration will be included later in T5, but was
 wondering
   if
   someone has already figured out how to do that.
   I am playing around converting an existing application to T5.
  
   Thanks,
  
   /Serge
   --
   View this message in context:
   http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

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





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



T5 Snapshots

2007-02-19 Thread Howard Lewis Ship

I just uploaed the lastest 5.0.2 snapshots.  This includes a fix for
the Grid component that DJ located.

--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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



Re: AW: My crap development environment

2007-02-19 Thread Norbert Sándor

Hot code replacement works with Tomcat as well (for minor changes).
(I use it with the Sysdeo plugin.)

Holger Stolzenberg írta:

Oh din not know that I will give it a try!!

-Ursprüngliche Nachricht-
Von: Joe Trewin [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 16. Februar 2007 11:15

An: Tapestry users
Betreff: RE: My crap development environment

Don't forget that if you launch your web app in debug mode from Eclipse (and 
probably other IDEs) with Jetty (and maybe Tomcat?) then *most* minor code 
changes, particularly to pages/components etc will be picked up automatically 
without a server restart. Eclipse will complain when it can't.

So even if you're not debugging it's often useful to launch in debug mode, 
depending on which part of your system you're developing.

  

-Original Message-
From: Holger Stolzenberg [mailto:[EMAIL PROTECTED]
Sent: 16 February 2007 08:55
To: Tapestry users
Subject: AW: My crap development environment

I think the WTP approach with the temporary tomcat installation is 
very good because you can defined which projects should be started 
with this tomcat, if you use one tomcat with sysdeo then all webapps 
will always be starte.



-Ursprüngliche Nachricht-
Von: Kalle Korhonen [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 15. Februar 2007 20:39
An: Tapestry users
Betreff: Re: My crap development environment

Sysdeo's plugin is no silver bullet, but I keep evaluating 
alternatives and so far I haven't found anything better. The most 
common gotchas with Sysdeo is installing devloader (which you will 
need) and maintaining the set of libraries to load (for which 
sysdeo-tomcat-plugin is used), setting the context path correctly and 
making sure you don't have servlet-api loaded with the devloader. I 
have developers asking about these over and over again.


Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:


I'll have to try the sysdeo plugin again. I used to use it
  

but at some


point I decided I preferred the WTP plugin (I don't quite
  

remember now

the reason). In any case, it's very possible it takes 45 seconds in 
the initial build/publish  if he has a slow disk or a large set of 
libraries to copy over. After the initial build, however, it should 
take a second or so to copy over any incremental changes
  

(that's why I


think he has an incremental builder problem).



On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
  
Oh ok. Yea I never understood why WTP went with that approach. 
There's


gotta
  
be some file locking issues though if that takes 45 seconds - 
luckily


I'm on
  
Linux so I don't care. I use Sysdeo's Tomcat plugin that runs 
everything in-place (I have Jetty as well but don't see much of a 
difference in performance either way). And now with Discursive's 
sysdeo-tomcat-plugin


it's
  

ah all so nicely automated.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:


When using eclipse Web Standard Tools, eclipse sets up
  

a temporary


Tomcat (or other app server) directory with
  

configuration and your


project files. Tomcat is then started from this
  

directory. This is


done so you can have more control of when your changes
  

appear in

Tomcat. You can have it set so every time it detects changes in 
your build it copies the affected files to the temporary 
directory, or you can have it so you publish manually
  

(For example

I have auto-build enabled so I don't necessarily want tomcat 
restarting every time it detects a change, so I publish
  

manually

after I have made the set of changes I want). So basically 
Publishing involves just synchronizing the files tomcat sees 
with the contents of your eclipse biuld directory.


On 2/15/07, Kalle Korhonen [EMAIL PROTECTED] wrote:
  
Just out of interest, what's this publishing step? 


Compilation


is


the
  

only
  
thing and occasional re-load of the context when hotswapping 
fails


(like
  

it
  

does with Tomcat most of the time)  that should be


required. If


you


do
  

something else, I think you haven't set up your environment


correctly
  

for
  

development.

Kalle

On 2/15/07, Daniel Tabuenca [EMAIL PROTECTED] wrote:

I really don't think the Jetty plugin is going to solve his 
performance problems. Jetty might or might not be
  

faster but


in
  

any
  
case, not significantly enough to solve his problem. I am 
willing
  

to
  
bet that his problem is due to an incremental compile issue 
where
  

his
  
entire project is re-compiled every time he saves one file. 
He's talking about 60 seconds before the server even begins 
starting
  

up. I
 

Re: T5: Spring Integration

2007-02-19 Thread Howard Lewis Ship

Yep, and all of this stuff will be rolled into a tapestry-spring Maven
archetype.

The tapestry-spring-integration module will support
@Inject(spring:bean) to allow access to anything in the Spring bean
context.

On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:

Good catch :-)

You also have to add the following line to your web.xml:

listenerlistener-class
org.springframework.web.context.ContextLoaderListener
/listener-class/listener


On 2/19/07, James Carman [EMAIL PROTECTED] wrote:

 Of course, you have to set up the ContextLoaderListener, right?


 On 2/19/07, DJ Gredler [EMAIL PROTECTED] wrote:
  You can just inject the following into your pages:
 
  @Inject
  private ApplicationGlobals globals;
 
  And then use the servlet context inside the globals object to get the
  application context via
 
  WebApplicationContextUtils.getRequiredWebApplicationContext
  (servletContext);
 
  Once you have the application context, you just call getBean(String) to
 get
  your managed beans.
 
 
 
  On 2/19/07, SergeEby [EMAIL PROTECTED] wrote:
  
  
   Hi,
  
   I know Spring integration will be included later in T5, but was
 wondering
   if
   someone has already figured out how to do that.
   I am playing around converting an existing application to T5.
  
   Thanks,
  
   /Serge
   --
   View this message in context:
   http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869
   Sent from the Tapestry - User mailing list archive at Nabble.com.
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 

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






--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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



Upgrade to 4.1.1 or wait to 4.12

2007-02-19 Thread Chris Chiappone

I am about to upgrade from 4.0.1 to 4.1.1 but would like to know if
4.1.2 will be considered stable soon or not.  If so I may as well just
wait for 4.1.2.

--
~chris

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



Re: T5: Spring Integration

2007-02-19 Thread Massimo Lusetti

On 2/19/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:


Yep, and all of this stuff will be rolled into a tapestry-spring Maven
archetype.

The tapestry-spring-integration module will support
@Inject(spring:bean) to allow access to anything in the Spring bean
context.


I've already done the same thing for hivemind, using the hivemind:
prefix, it would only take small amount of time to convert this to
spring.

I'll post these as JIRA issues.

--
Massimo
http://meridio.blogspot.com

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



Variable numbers of rows

2007-02-19 Thread Michael Prescott
We've got a couple of forms where users can edit a list of items, and
also add new items to the bottom.  We're currently doing this by sending
preset number of hidden rows, revealed as necessary by Javascript -
although this is a little lame.
 
It seems that components like @For are designed to handle changes in the
backing data set that originate on the server, but not on the client.
There are hidden fields that need maintenance, for one thing.
 
Is there a common approach for this sort of scenario?  Off the top of my
head, it looks like I might need to implement something like @For, but
which has a well-known (or at least published) contract in terms of the
hidden field maintenance that would be required.
 
Any clues or pointers would be much appreciated.
 
Michael
 

Michael Prescott
direct: 416.646.7062

main: 416.646.7000 
fax: 416.646.7050 

Exchange Solutions Inc.
250 Yonge Street, 18th Floor
Toronto, ON M5B 2L7
www.exchangesolutions.com

 


RE: Variable numbers of rows

2007-02-19 Thread Mark Stang
Which version of Tapestry are you using?

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Michael Prescott [mailto:[EMAIL PROTECTED]
Sent: Mon 2/19/2007 2:29 PM
To: tapestry-user@jakarta.apache.org
Subject: Variable numbers of rows
 
We've got a couple of forms where users can edit a list of items, and
also add new items to the bottom.  We're currently doing this by sending
preset number of hidden rows, revealed as necessary by Javascript -
although this is a little lame.
 
It seems that components like @For are designed to handle changes in the
backing data set that originate on the server, but not on the client.
There are hidden fields that need maintenance, for one thing.
 
Is there a common approach for this sort of scenario?  Off the top of my
head, it looks like I might need to implement something like @For, but
which has a well-known (or at least published) contract in terms of the
hidden field maintenance that would be required.
 
Any clues or pointers would be much appreciated.
 
Michael
 

Michael Prescott
direct: 416.646.7062

main: 416.646.7000 
fax: 416.646.7050 

Exchange Solutions Inc.
250 Yonge Street, 18th Floor
Toronto, ON M5B 2L7
www.exchangesolutions.com

 



RE: Variable numbers of rows

2007-02-19 Thread Michael Prescott
Sorry, Tapestry 4.0.

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED] 
Sent: February 19, 2007 4:46 PM
To: Tapestry users; tapestry-user@jakarta.apache.org
Subject: RE: Variable numbers of rows

Which version of Tapestry are you using?

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Michael Prescott [mailto:[EMAIL PROTECTED]
Sent: Mon 2/19/2007 2:29 PM
To: tapestry-user@jakarta.apache.org
Subject: Variable numbers of rows
 
We've got a couple of forms where users can edit a list of items, and
also add new items to the bottom.  We're currently doing this by sending
preset number of hidden rows, revealed as necessary by Javascript -
although this is a little lame.
 
It seems that components like @For are designed to handle changes in the
backing data set that originate on the server, but not on the client.
There are hidden fields that need maintenance, for one thing.
 
Is there a common approach for this sort of scenario?  Off the top of my
head, it looks like I might need to implement something like @For, but
which has a well-known (or at least published) contract in terms of the
hidden field maintenance that would be required.
 
Any clues or pointers would be much appreciated.
 
Michael
 

Michael Prescott
direct: 416.646.7062

main: 416.646.7000
fax: 416.646.7050 

Exchange Solutions Inc.
250 Yonge Street, 18th Floor
Toronto, ON M5B 2L7
www.exchangesolutions.com

 




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



Re: Tapestry Bamboo Site

2007-02-19 Thread Howard Lewis Ship

Yes, just a bit of a turf battle between Bamboo and Maven. The proble
is that I don't have physical access to the server (its in Vancouver)
and that, because of the Tapestry intergration tests (which use
Selenium), it has to run logged in under X, so I can't just ssh in and
restart it.

So far, I like Bamboo except for the near total lack of documentation;
even so I was able to set it up easily on my Mac, and then on the rack
server.

Caution: import/export is broken. The export exports hard path names
that won't work (and can't be fixed) when you import.  Basically,
pretty useless unless you upgrade in place or something.

On 2/19/07, James Carman [EMAIL PROTECTED] wrote:

We're actually thinking of using Bamboo at work, so if you find that
this is a big issue, could you let the list (or me directly) know?  Is
it just a matter of starting the JVM with more heap memory?

On 2/19/07, Howard Lewis Ship [EMAIL PROTECTED] wrote:
 Yep, we're still working on that.

 On 2/19/07, Jiri Mares [EMAIL PROTECTED] wrote:
 
  Hi Howard,
 
  that's great, but if you try to view tests for Tapestry4 you get 
OutOfMemory exception :-(
 
  Howard Lewis Ship napsal(a):
  
   Thanks to the great folks at Formos, Tapestry now has continuous
   integration.
  
   Surf on over to http://tapestry.formos.com/bamboo/ to see the current
   status of the T5 builds.  I expect we'll be adding in the T4 builds as
   well.
  
   This is a great way to see the progress of Tapestry over time and
   track the changes that have been occuring.
  
 
  --
  Jiří Mareš (mailto:[EMAIL PROTECTED])
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Howard M. Lewis Ship
 TWD Consulting, Inc.
 Independent J2EE / Open-Source Java Consultant
 Creator and PMC Chair, Apache Tapestry
 Creator, Apache HiveMind

 Professional Tapestry training, mentoring, support
 and project work.  http://howardlewisship.com






--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com


Re: Record locking

2007-02-19 Thread Murray Collingwood
James Carman james at carmanconsulting.com writes:
 You can use optimistic locking.  When the user submits and they have
 outdated data, then you just merge the object's data with what is in
 the data store and show it back to the user for them to confirm it.

In an application where the user can spend 20 minutes completing the information
in a row, they are not going to be happy when they find out somebody else has
been updating this same row and the information has all been merged.  They then
spend another 10 minutes cleaning up all of the duplicated changes.

Even pessimistic locking is not sufficient.  

I need guaranteed write-exclusive locking for the duration of the request. ie
when I read-for-update the record should be locked against all other
read-for-update requests until I save my changes and release the lock.

It sounds as though I'm going to have to write my own...again.

Cheers
mc





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



Re: Record locking

2007-02-19 Thread Fred Janon

Interesting question! I don't have any experience in doing this but it made
me search in one of my Websphere book. Not sure if that would fulfill your
requirements but TRANSACTION_SERIALIZABLE and PessimisticUpdate-Exclusive
might be worth investigating. I am not sure what container you use and if
JTA is available to you. I would check the JDBC driver as well, it might
have some extra transaction support. Writing your own is probably pretty
tempting when the answer is not obvious and you would know how it works. On
the other side you have an extra write (at least) each time and need to
manage the lock if the transaction is abandoned.

If you have the time to investigate more, you'll probably a transaction guru
soon. We, developers, have a tendency to avoid transactions and isolation
levels like plague... Not easy development and test subjects as the lack of
answers indicates...

Good luck and let us know what solution you end up with, I am curious.

Fred

On 2/20/07, Murray Collingwood [EMAIL PROTECTED] wrote:


James Carman james at carmanconsulting.com writes:
 You can use optimistic locking.  When the user submits and they have
 outdated data, then you just merge the object's data with what is in
 the data store and show it back to the user for them to confirm it.

In an application where the user can spend 20 minutes completing the
information
in a row, they are not going to be happy when they find out somebody else
has
been updating this same row and the information has all been merged.  They
then
spend another 10 minutes cleaning up all of the duplicated changes.

Even pessimistic locking is not sufficient.

I need guaranteed write-exclusive locking for the duration of the request.
ie
when I read-for-update the record should be locked against all other
read-for-update requests until I save my changes and release the lock.

It sounds as though I'm going to have to write my own...again.

Cheers
mc





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




Re: Record locking

2007-02-19 Thread Kalle Korhonen

Just out of curiosity, can you tell more about your use case? I just have a
hard time believing you'd need something like this for all of your tables -
rather I'd assume it's something specific to a type of a record. And if it's
the latter, I'd just implement it in the application level along the lines
you'd suggested. But I'm not sure I'd call it locking, which I understand as
a database feature for enforcing atomic transactions. It'd be fairly easy to
implement the checking and enforcing of your edit rule in a Hibernate
Interceptor. For obtaining the application level lock you can use
optimistic locking; this is sort of the same as doing svn lock.

Kalle

On 2/19/07, Murray Collingwood [EMAIL PROTECTED] wrote:


James Carman james at carmanconsulting.com writes:
 You can use optimistic locking.  When the user submits and they have
 outdated data, then you just merge the object's data with what is in
 the data store and show it back to the user for them to confirm it.

In an application where the user can spend 20 minutes completing the
information
in a row, they are not going to be happy when they find out somebody else
has
been updating this same row and the information has all been merged.  They
then
spend another 10 minutes cleaning up all of the duplicated changes.

Even pessimistic locking is not sufficient.

I need guaranteed write-exclusive locking for the duration of the request.
ie
when I read-for-update the record should be locked against all other
read-for-update requests until I save my changes and release the lock.

It sounds as though I'm going to have to write my own...again.

Cheers
mc





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




Re: Record locking

2007-02-19 Thread James Carman

I would say just put a property on the object that says that it has
been checked out or something.  That way, you can tell a user that
tries to edit it that they can't because so and so has this record
checked out and is editing it.


On 2/19/07, Kalle Korhonen [EMAIL PROTECTED] wrote:

Just out of curiosity, can you tell more about your use case? I just have a
hard time believing you'd need something like this for all of your tables -
rather I'd assume it's something specific to a type of a record. And if it's
the latter, I'd just implement it in the application level along the lines
you'd suggested. But I'm not sure I'd call it locking, which I understand as
a database feature for enforcing atomic transactions. It'd be fairly easy to
implement the checking and enforcing of your edit rule in a Hibernate
Interceptor. For obtaining the application level lock you can use
optimistic locking; this is sort of the same as doing svn lock.

Kalle

On 2/19/07, Murray Collingwood [EMAIL PROTECTED] wrote:

 James Carman james at carmanconsulting.com writes:
  You can use optimistic locking.  When the user submits and they have
  outdated data, then you just merge the object's data with what is in
  the data store and show it back to the user for them to confirm it.

 In an application where the user can spend 20 minutes completing the
 information
 in a row, they are not going to be happy when they find out somebody else
 has
 been updating this same row and the information has all been merged.  They
 then
 spend another 10 minutes cleaning up all of the duplicated changes.

 Even pessimistic locking is not sufficient.

 I need guaranteed write-exclusive locking for the duration of the request.
 ie
 when I read-for-update the record should be locked against all other
 read-for-update requests until I save my changes and release the lock.

 It sounds as though I'm going to have to write my own...again.

 Cheers
 mc





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





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



Re: Record locking

2007-02-19 Thread Luis Rodrigo Gallardo Cruz
On Mon, Feb 19, 2007 at 08:17:02PM -0500, James Carman wrote:
 I would say just put a property on the object that says that it has
 been checked out or something.  That way, you can tell a user that
 tries to edit it that they can't because so and so has this record
 checked out and is editing it.

One has to be careful with this approach, because the checkout must,
somehow, expire, otherwise you risk leaving an object permanently
uneditable if a client gets disconected/forgotten/whatever.

Just throwing random ideas about: How about making the 'checked-out'
property a weak hash, pointing to the editing user's session (or some
attribute within)? I assume the J2EE container will GC expired sessions,
thus automatically expiring the object's check-out.

-- 
Rodrigo Gallardo
GPG-Fingerprint: 7C81 E60C 442E 8FBC D975  2F49 0199 8318 ADC9 BC28
Zenophobia: the irrational fear of convergent sequences.


signature.asc
Description: Digital signature


Re: Record locking

2007-02-19 Thread James Carman

Just use the session id and set up an HttpSessionListener to remove
user's locks when their session expires.


On 2/19/07, Luis Rodrigo Gallardo Cruz [EMAIL PROTECTED] wrote:

On Mon, Feb 19, 2007 at 08:17:02PM -0500, James Carman wrote:
 I would say just put a property on the object that says that it has
 been checked out or something.  That way, you can tell a user that
 tries to edit it that they can't because so and so has this record
 checked out and is editing it.

One has to be careful with this approach, because the checkout must,
somehow, expire, otherwise you risk leaving an object permanently
uneditable if a client gets disconected/forgotten/whatever.

Just throwing random ideas about: How about making the 'checked-out'
property a weak hash, pointing to the editing user's session (or some
attribute within)? I assume the J2EE container will GC expired sessions,
thus automatically expiring the object's check-out.

--
Rodrigo Gallardo
GPG-Fingerprint: 7C81 E60C 442E 8FBC D975  2F49 0199 8318 ADC9 BC28
Zenophobia: the irrational fear of convergent sequences.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFF2k6xAZmDGK3JvCgRAnMJAJ9TFHFOmAlciwoY2kQO+rYdMBcvxgCffRk0
tl1+WX/ZP82yNXrwuELwhcA=
=x6eX
-END PGP SIGNATURE-




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



Re: Record locking

2007-02-19 Thread Jesse Kuhnert

Of course this all assumes that locking something is a good idea at
all from a usability / scalability pov. There are rare occasions where
it's needed but I'm skeptical nonetheless...

At the very best you could do some kind of comet approach to letting
the user know someone else is beginning (or is) also editing
something. (like gmail showing that yellow box when someone else is
replying to the same email thread) It's a big can of worms.

On 2/19/07, James Carman [EMAIL PROTECTED] wrote:

Just use the session id and set up an HttpSessionListener to remove
user's locks when their session expires.


On 2/19/07, Luis Rodrigo Gallardo Cruz [EMAIL PROTECTED] wrote:
 On Mon, Feb 19, 2007 at 08:17:02PM -0500, James Carman wrote:
  I would say just put a property on the object that says that it has
  been checked out or something.  That way, you can tell a user that
  tries to edit it that they can't because so and so has this record
  checked out and is editing it.

 One has to be careful with this approach, because the checkout must,
 somehow, expire, otherwise you risk leaving an object permanently
 uneditable if a client gets disconected/forgotten/whatever.

 Just throwing random ideas about: How about making the 'checked-out'
 property a weak hash, pointing to the editing user's session (or some
 attribute within)? I assume the J2EE container will GC expired sessions,
 thus automatically expiring the object's check-out.

 --
 Rodrigo Gallardo
 GPG-Fingerprint: 7C81 E60C 442E 8FBC D975  2F49 0199 8318 ADC9 BC28
 Zenophobia: the irrational fear of convergent sequences.

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.6 (GNU/Linux)

 iD8DBQFF2k6xAZmDGK3JvCgRAnMJAJ9TFHFOmAlciwoY2kQO+rYdMBcvxgCffRk0
 tl1+WX/ZP82yNXrwuELwhcA=
 =x6eX
 -END PGP SIGNATURE-



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





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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



Re: Record locking

2007-02-19 Thread RWinter
How about using  a SELECT  . . . FOR UPDATE statement to select the record
being edited.  Once you read the record it will be locked, and as long as
you keep the transaction open for the duration of the edit then no other
transaction will be able to select the same record for update.  If the
transaction times out the DB management system will release the record for
someone else to work with.

Roland.

If you stand up and be counted, from time to time you may get yourself
knocked down. But remember this: A man flattened by an opponent can get up
again. A man flattened by conformity stays down for good. - Thomas J.
Watson, Jr.

Fred Janon [EMAIL PROTECTED] wrote on 20/02/2007 10:44:20:

 Interesting question! I don't have any experience in doing this but it
made
 me search in one of my Websphere book. Not sure if that would fulfill
your
 requirements but TRANSACTION_SERIALIZABLE and PessimisticUpdate-Exclusive
 might be worth investigating. I am not sure what container you use and if
 JTA is available to you. I would check the JDBC driver as well, it might
 have some extra transaction support. Writing your own is probably pretty
 tempting when the answer is not obvious and you would know how it works.
On
 the other side you have an extra write (at least) each time and need to
 manage the lock if the transaction is abandoned.

 If you have the time to investigate more, you'll probably a transaction
guru
 soon. We, developers, have a tendency to avoid transactions and isolation
 levels like plague... Not easy development and test subjects as the lack
of
 answers indicates...

 Good luck and let us know what solution you end up with, I am curious.

 Fred

 On 2/20/07, Murray Collingwood [EMAIL PROTECTED] wrote:
 
  James Carman james at carmanconsulting.com writes:
   You can use optimistic locking.  When the user submits and they have
   outdated data, then you just merge the object's data with what is in
   the data store and show it back to the user for them to confirm it.
 
  In an application where the user can spend 20 minutes completing the
  information
  in a row, they are not going to be happy when they find out somebody
else
  has
  been updating this same row and the information has all been merged.
They
  then
  spend another 10 minutes cleaning up all of the duplicated changes.
 
  Even pessimistic locking is not sufficient.
 
  I need guaranteed write-exclusive locking for the duration of the
request.
  ie
  when I read-for-update the record should be locked against all other
  read-for-update requests until I save my changes and release the lock.
 
  It sounds as though I'm going to have to write my own...again.
 
  Cheers
  mc
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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



Re: Record locking

2007-02-19 Thread Fred Janon

Yep, SELECT for UPDATE is what's behind TRANSACTION_SERIALIZABLE...

On 2/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


How about using  a SELECT  . . . FOR UPDATE statement to select the record
being edited.  Once you read the record it will be locked, and as long as
you keep the transaction open for the duration of the edit then no other
transaction will be able to select the same record for update.  If the
transaction times out the DB management system will release the record for
someone else to work with.

Roland.


If you stand up and be counted, from time to time you may get yourself
knocked down. But remember this: A man flattened by an opponent can get up
again. A man flattened by conformity stays down for good. - Thomas J.
Watson, Jr.

Fred Janon [EMAIL PROTECTED] wrote on 20/02/2007 10:44:20:

 Interesting question! I don't have any experience in doing this but it
made
 me search in one of my Websphere book. Not sure if that would fulfill
your
 requirements but TRANSACTION_SERIALIZABLE and
PessimisticUpdate-Exclusive
 might be worth investigating. I am not sure what container you use and
if
 JTA is available to you. I would check the JDBC driver as well, it might
 have some extra transaction support. Writing your own is probably pretty
 tempting when the answer is not obvious and you would know how it works.
On
 the other side you have an extra write (at least) each time and need to
 manage the lock if the transaction is abandoned.

 If you have the time to investigate more, you'll probably a transaction
guru
 soon. We, developers, have a tendency to avoid transactions and
isolation
 levels like plague... Not easy development and test subjects as the lack
of
 answers indicates...

 Good luck and let us know what solution you end up with, I am curious.

 Fred

 On 2/20/07, Murray Collingwood [EMAIL PROTECTED] wrote:
 
  James Carman james at carmanconsulting.com writes:
   You can use optimistic locking.  When the user submits and they have
   outdated data, then you just merge the object's data with what is in
   the data store and show it back to the user for them to confirm it.
 
  In an application where the user can spend 20 minutes completing the
  information
  in a row, they are not going to be happy when they find out somebody
else
  has
  been updating this same row and the information has all been merged.
They
  then
  spend another 10 minutes cleaning up all of the duplicated changes.
 
  Even pessimistic locking is not sufficient.
 
  I need guaranteed write-exclusive locking for the duration of the
request.
  ie
  when I read-for-update the record should be locked against all other
  read-for-update requests until I save my changes and release the lock.
 
  It sounds as though I'm going to have to write my own...again.
 
  Cheers
  mc
 
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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




Re: Variable numbers of rows

2007-02-19 Thread Jesse Kuhnert

I think T4.1 does this sort of mundane state mgmt kind of stuff for you.

On 2/19/07, Michael Prescott [EMAIL PROTECTED] wrote:

Sorry, Tapestry 4.0.

-Original Message-
From: Mark Stang [mailto:[EMAIL PROTECTED]
Sent: February 19, 2007 4:46 PM
To: Tapestry users; tapestry-user@jakarta.apache.org
Subject: RE: Variable numbers of rows

Which version of Tapestry are you using?

Mark J. Stang
Senior Engineer/Architect
office: +1 303.468.2900
mobile: +1 303.507.2833
Ping Identity



-Original Message-
From: Michael Prescott [mailto:[EMAIL PROTECTED]
Sent: Mon 2/19/2007 2:29 PM
To: tapestry-user@jakarta.apache.org
Subject: Variable numbers of rows

We've got a couple of forms where users can edit a list of items, and
also add new items to the bottom.  We're currently doing this by sending
preset number of hidden rows, revealed as necessary by Javascript -
although this is a little lame.

It seems that components like @For are designed to handle changes in the
backing data set that originate on the server, but not on the client.
There are hidden fields that need maintenance, for one thing.

Is there a common approach for this sort of scenario?  Off the top of my
head, it looks like I might need to implement something like @For, but
which has a well-known (or at least published) contract in terms of the
hidden field maintenance that would be required.

Any clues or pointers would be much appreciated.

Michael


Michael Prescott
direct: 416.646.7062

main: 416.646.7000
fax: 416.646.7050

Exchange Solutions Inc.
250 Yonge Street, 18th Floor
Toronto, ON M5B 2L7
www.exchangesolutions.com






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





--
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

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