RE: action chaining without resetting action forms

2001-12-07 Thread Cakalic, James P.
, Husted dot Com, Fairport NY USA.
 -- Custom Software ~ Technical Services.
 -- Tel +1 716 737-3463
 -- http://www.husted.com/struts/
 
 
 Cakalic, James P. wrote:
  Upshot is, if there are any problems forwarding between 
 Actions that are
  essentially different than the semantics of forwarding from 
 an Action to a
  JSP, I really need to know what they are and how they can 
 be addressed.
  
  Best regards,
  Jim Cakalic
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 


font size=1Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.




RE: action chaining without resetting action forms

2001-12-07 Thread Cakalic, James P.

Ted Husted wrote:
 Personally, I'd think in terms of putting whatever you have 
 in mind for an Action into a servlet, so that it is not coupled 
 directly with Struts. 
 
 I have been working with the Velocity team on finishing the work
 Geir started last spring. We should have an improved VelServlet 
 available for testing next week. 
 
 The approach here is to forward to a Velocity servlet to render
 the page, so that they are drop-in replacement for JSPs. Again,
 you should really think about doing the same approach for your
 project.

Okay. Sounds like an interesting possibility. I guess I should
monitor the Velocity site/mail list for this announcement?
Thanks again.
Jim


font size=1Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.




RE: action chaining without resetting action forms

2001-12-06 Thread Cakalic, James P.

I'm interested (I think) in action-chaining. I'd like to use struts for
development in a project just ramping up. However, I plan to _completely_
abandon JSP and use XMLC to generate the presentation. To do this I intended
to split processing between a request-Action and a response-Action. The
request-Action would be responsible for handling the incoming request by
validating the input if needed and acting upon the model -- just like any
Action today. The response-Action would take the place of a JSP. It would be
responsible for using the results generated by the request-Action to alter
the DOM representation of an HTML page using an XMLC-generated class. It
would then generate the HTML directly to the response and return null.

Upshot is, if there are any problems forwarding between Actions that are
essentially different than the semantics of forwarding from an Action to a
JSP, I really need to know what they are and how they can be addressed.

Best regards,
Jim Cakalic

 -Original Message-
 From: Volker Krebs [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 06, 2001 6:59 AM
 To: Struts Users Mailing List
 Subject: Re: action chaining without resetting action forms
 
 
 Hi,
 
  For the nightly build, I've suggested that we add two new methods so
  that one Action can invoke another, but need some people to test the
  idea for me. (Since I don't do this sort of thing myself.)
  
  If anyone is interested, I can post a patched JAR. But then 
 they really,
  really need to tell me that it works, or else this will never be
  committed. 
 
 
 I'm intrested, can you please post a patched JAR.
 We are doing some Action chaning in our application.
 
 I want to 'chain' actions, by setting the forward of one to be
 'my_action.do'
 The problem is that this resets the action form before 
 calling the next
 action.
 
 
 In our Application this works fine. If I forward from one Action 
 
 to another Action,
 
 the form Bean is still known in the second Action.
 But this might be, because both Actions use the same FormBean
 in their struts-config name tag as default FormBean.
 
 Volker
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 


font size=1Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.




RE: Connections Transactions

2001-12-05 Thread Cakalic, James P.

This may, in part, depend on how your session bean acquires the connection.
On my project we are using WebSphere (currently 3.5.x) and Oracle 8i. When
the project started, Oracle's JDBC drivers were not fully JTA compliant so
WebSphere could not use them in two phase commit operations. As the project
was being implemented by a geographically distributed team without a clear
architectural consensus, some parts of the system were developed using
entity beans extensively and others were developed using entirely JDBC. The
problem arose when both forms of database access were used within a single
container-managed transaction. The reason was that the CMP entity beans and
the JDBC data access code were both acquiring their connections from a
common WebSphere managed DataSource. It appeared that WebSphere could (and
would) attempt to manage all activity across multiple connections using it's
managed DataSources. This resulted in TransactionRollbackExceptions all
across the system. The solution at that point in time was to acquire JDBC
connections from an alternate source. First the DriverManager directly to
prove it would work and then an OraclePooledDataSource for performance.
Since WebSphere was not aware of these connections, it would not attempt to
include them in its transactions.

The point of my (rather long-winded) story is that it depends. My
assumption would be that if the container knows about the use of the
connection in a transaction -- either because it acquired it for CMP
persistence or you acquired it from one of its defined data sources -- then
all operations performed on the connection become part of the transaction
scope managed by the container. If you acquire the connection by another
means then the container will not be involved. The best bet is to drive a
spike to test this hypothesis in your environment. 

Best regards,
Jim Cakalic

 -Original Message-
 From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, December 05, 2001 4:49 AM
 To: 'Struts Users Mailing List'
 Subject: RE: Connections  Transactions
 
 
 HI Aneesha,
 
 I think it depends on if you are using declarative 
 transactions within your
 stateless bean. If you are and set your transaction attribute 
 to start a new
 transaction, then the answer is yes. If you are not using declarative
 transactions then it will be up to you to start a new 
 transaction, either in
 the DOA or the stateless session bean.
 
 Jon Ridgway
 
 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED]] 
 Sent: 05 December 2001 04:59
 To: [EMAIL PROTECTED]
 Subject: Connections  Transactions
 
 Hi all,
 
 I have a question. If I have a DAO that is implemented as a 
 simple java
 class. I make a connection object at my session bean and pass 
 it to the DAO
 object. And the DAO object does all its operations on that connection
 object. Then will the DAO come into the same transaction scope as the
 session bean
 
 This is really urgent. Would appreciate any help,
 
 Thanks
 Aneesha
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 


font size=1Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.




RE: Member variables in Actions

2001-11-21 Thread Cakalic, James P.

Quoting from the Struts User's Guide:

The controller servlet creates only one instance of your Action class, and
uses it for all requests. Thus, you need to code your Action class so that
it operates correctly in a multi-threaded environment, just as you must code
a servlet's service method safely.

The most important principle that aids in thread-safe coding is to use only
local variables, not instance variables, in your Action class. Local
variables are created on a stack that is assigned (by your JVM) to each
thread request, so there is no need to worry about sharing them.

Best regards,
Jim Cakalic

 -Original Message-
 From: Dave J Dandeneau [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 21, 2001 1:49 PM
 To: Struts Users Mailing List
 Subject: Member variables in Actions
 
 
 Is there any reason that you would / wouldn't want to put member
 variables in an action? I know that using member variables in some
 servlet containers can sometimes slow things down. I don't 
 know how the
 actions are pooled / instantiated, and what affect this might have on
 the performance.  
 
 Thanks,
 Dave Dandeneau
 


font size=1Confidentiality Warning:  This e-mail contains information intended 
only for the use of the individual or entity named above.  If the reader of this 
e-mail is not the intended recipient or the employee or agent responsible for 
delivering it to the intended recipient, any dissemination, publication or copying of 
this e-mail is strictly prohibited. The sender does not accept any responsibility for 
any loss, disruption or damage to your data or computer system that may occur while 
using data contained in, or transmitted with, this e-mail.   If you have received this 
e-mail in error, please immediately notify us by return e-mail.  Thank you.