Re: [iPlanet-JATO] More on ComputedColumn issue

Vladimir--
I'm going to answer this question without doing my full homework on it;
please let me know if I hit the mark or not. If I understand correctly, you
have a problem using a model for both UPDATE and SELECT queries because of a
computed column...correct?
If so, this issue is solved in JATO 1.2. 1.2 has an attribute in the field
descriptor to indicate in which type of queries a field should be used. You
can use this attribute to indicate that a field should only be used for
UPDATE queries, SELECT queries, or whatever combination of query types you
require. You can then define synthetic fields for use only during one of
the query types.
Does this sound useful in fixing your issue? A way around this in JATO 1.1
would be to create separate models for SELECT and UPDATE queries. The
SELECT model could contain all the fields for the joined query, but the
UPDATE model would contain info for only one table. The 1.2 feature simple
allows you to do the same using one model.
Todd
----- Original Message -----
From: "vivanov4114" <vivanov@b...>
Sent: Friday, January 11, 2002 8:12 AM
Subject: [iPlanet-JATO] More on ComputedColumn issue
We have a similar problem with do's ComputedColumn after the
translation as Kostas described in his detailed message #439.
We have JATO/iMT version 1.1. Is the resolution of this problem added
to the version 1.2 (or 1.2.1)?
I've tried to adjust the ModelImpl class based on the .sdo file
(using ComputedColumn attributes) for these fields and failed.
Whether I missed something else, or our situation is a little bit
different.
In our case the dataObject has one Computed Field from one table and
another Computed Field from another table along with joint between
these two tables and third one, and, finally, the whole stuff is
under the repeatable (with static fields bindings to these two
computed fields).
The modelImpl class after the translation (as in the #439) has the
same values "" and "." for ..._NAME and QUALIFIED_..._NAME strings
respectively (for each computed do's field).
I guess that we could meet extra problem with this (for manual
adjustment) because of there is no TableName attribute in .sdo file
for computed field (as well as there is no ColumnName attribute for
computed field). If ComputedColumn attribute (computed field) could
play a role of ColumnName attribute (regular case), what would be an
analog of TableName attribute for computed field?
The bottom line of this is as follows: we have a same
SQLException "Invalid Column Name"
from ResultSetModelBase.updateModel() as Kostas described. It causes
the problem for
RequestHandlingTiledViewBase.executeAutoRetrieving() method that
can't bind the proper Model.
Finally, beginDisplay() method from
pgXXXXPriorityCountTiledView.class throws exception and
jasper compiler brings run-time error (Tomcat 3.2).
Kostas, if this problem still exists for translation of such cases,
could you please post a fragment that fixed you original problem in
addition to the message #439 (just to be sure, that I haven't missed
something important).
Thank you very much in advance.
Vladimir Ivanov,
P. S. I've enclosed the excerption from the .sdo file for this
dataObject below.
Class "SQLObject" ;
Name "doPriorityCount" ;
DataFields {
0 { // first df is a computed column from the first
//table
Class "DataField" ;
Name "dfPriorityDesc" ;
ComputedColumn "MIN
(MOS.PRIORITY.PDESCRIPTION)" ;
1 { // second df is a computed column from the second
// table
Class "DataField" ;
Name "dfPriorityCount" ;
ComputedColumn "COUNT
(ASSIGNEDTASKSWORKQUEUE.PRIORITYID)" ;
2 { // third df is a regular df
Class "DataField" ;
Name "MOS_PRIORITY_PRIORITYID" ;
TableName "MOS.PRIORITY" ; // this attribute
// doesn't exist for ComputedColumn
ColumnName "PRIORITYID" ; // this attribute
// doesn't exist for ComputedColumn
DataCachingEnabled "False" ;
DataCachingDuration "0" ;
DataCachingMaxRows "200" ;
DataObjectType "Select" ;
Tables "MOS.ASSIGNEDTASKSWORKQUEUE,MOS.PRIORITY,MOS.DEAL" ;
SQLDistinct "False" ;
SelectFilter {
"MOS.DEAL.SCENARIORECOMMENDED" ;
"=" ;
"'Y'" ;
"AND" ;
"MOS.DEAL.COPYTYPE" ;
"<>" ;
"'T'" ;
SelectOrder {
"MOS.PRIORITY.PRIORITYID ASC" ;
SelectGroup {
"MOS.PRIORITY.PRIORITYID" ;
EnableEntireTableDelete "False" ;
EnableEntireTableUpdate "False" ;
SQLTextOverrideSelect "Partial" ;
SQLTextOverrideDelete "None" ;
SQLTextSelectJoin "MOS.ASSIGNEDTASKSWORKQUEUE.DEALID =
MOS.DEAL.DEALID
AND MOS.PRIORITY.PRIORITYID <> 0
AND MOS.PRIORITY.PRIORITYID =
MOS.ASSIGNEDTASKSWORKQUEUE.PRIORITYID(+)
AND MOS.ASSIGNEDTASKSWORKQUEUE.TASKSTATUSID
(+) = 1 " ;
For more information about JATO, including download information, pleasevisit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp

Todd,
Sorry for the delay with the answer, I've tried to obtain JATO 1.2
and repeat the project migration to verify whether version 1.2 solves
my problem or not (actually, it is a pilot sub-project).
Unfortunately, I still have no 1.2 version.
Let me try to answer on your question without getting the results
with JATO 1.2. Your explanation sounds like version 1.2 is very close
to solve the problem. Actually, our situation is easier because we
have SELECT object only, not SELECT and UPDATE. For data integrity
the only 'Select' ND's do(s) have been used through the whole
project. The backend communication (update, delete) is provided via
EJB like (entity) Java classes.
My question is: could I define synthetic field with 1.1.1 version. By
the way, word synthetic reflects the possibility to construct the
field under certain SQL circumstances (SELECT, UPDATE, e.g.) or the
possibility to construct a `fake' field (for example,
CountColumn of a do) as well. If the later is true, could you please
give a brief idea how to create this synthetic field.
After the translation in the doPriorityCountModelImpl class we've
got:
public static final String COLUMN_DFPRIORITYDESC="";
public static final String QUALIFIED_COLUMN_DFPRIO
RITYDESC=".";
public static final String COLUMN_DFPRIORITYCOUNT="";
public static final String QUALIFIED_COLUMN_DFPRIO
RITYCOUNT=".";
(see my original post please with details, as well).
If this is not a problem for 1.2 please do not waste your time to fix
it for 1.1.1. I need to repeat my results with the version 1.2 anyway.
We have a number of similar idioms through the project. In this
particular case, the CountColumn that counts the field from another
table may bring problem for manual adjustment (see my original
notes). The whole SQL query is as follows (for this case):
SELECT MIN(MOS.PRIORITY.PDESCRIPTION),
COUNT(ASSIGNEDTASKSWORKQUEUE.PRIORITYID),
MOS.PRIORITY.PRIORITYID
FROM MOS.ASSIGNEDTASKSWORKQUEUE, MOS.PRIORITY, MOS.DEAL
WHERE MOS.DEAL.SCENARIORECOMMENDED = 'Y'
AND MOS.DEAL.COPYTYPE <> 'T'
GROUP BY MOS.PRIORITY.PRIORITYID
ORDER BY MOS.PRIORITY.PRIORITYID ASC
During the pre-handler activity (it is the part of our Object
Framework on the top of Netdynamics Object Framework) system passes
id (and mos.deal.dealid = XXX) to the do (select query). After the
run-time execution of this do the results are displayed on the screen
bind to the repeatable statics.
Thank you very much,
Vladimir
--- In iPlanet-JATO@y..., "Todd Fast" <Todd.Fast@S...> wrote:
Vladimir--
I'm going to answer this question without doing my full homework on it;
please let me know if I hit the mark or not. If I understand correctly, you
have a problem using a model for both UPDATE and SELECT queries because of a
computed column...correct?
If so, this issue is solved in JATO 1.2. 1.2 has an attribute in the field
descriptor to indicate in which type of queries a field should be used. You
can use this attribute to indicate that a field should only be used for
UPDATE queries, SELECT queries, or whatever combination of query types you
require. You can then define synthetic fields for use only during one of
the query types.
Does this sound useful in fixing your issue? A way around this in JATO 1.1
would be to create separate models for SELECT and UPDATE queries. The
SELECT model could contain all the fields for the joined query, but the
UPDATE model would contain info for only one table. The 1.2 feature simple
allows you to do the same using one model.
Todd
----- Original Message -----
From: "vivanov4114" <vivanov@b...>
Sent: Friday, January 11, 2002 8:12 AM
Subject: [iPlanet-JATO] More on ComputedColumn issue
We have a similar problem with do's ComputedColumn after the
translation as Kostas described in his detailed message #439.
We have JATO/iMT version 1.1. Is the resolution of this problem
added
to the version 1.2 (or 1.2.1)?
I've tried to adjust the ModelImpl class based on the .sdo file
(using ComputedColumn attributes) for these fields and failed.
Whether I missed something else, or our situation is a little bit
different.
In our case the dataObject has one Computed Field from one table and
another Computed Field from another table along with joint between
these two tables and third one, and, finally, the whole stuff is
under the repeatable (with static fields bindings to these two
computed fields).
The modelImpl class after the translation (as in the #439) has the
same values "" and "." for ..._NAME and QUALIFIED_..._NAME strings
respectively (for each computed do's field).
I guess that we could meet extra problem with this (for manual
adjustment) because of there is no TableName attribute in .sdo file
for computed field (as well as there is no ColumnName attribute for
computed field). If ComputedColumn attribute (computed field) could
play a role of ColumnName attribute (regular case), what would be an
analog of TableName attribute for computed field?
The bottom line of this is as follows: we have a same
SQLException "Invalid Column Name"
from ResultSetModelBase.updateModel() as Kostas described. It causes
the problem for
RequestHandlingTiledViewBase.executeAutoRetrieving() method that
can't bind the proper Model.
Finally, beginDisplay() method from
pgXXXXPriorityCountTiledView.class throws exception and
jasper compiler brings run-time error (Tomcat 3.2).
Kostas, if this problem still exists for translation of such cases,
could you please post a fragment that fixed you original problem in
addition to the message #439 (just to be sure, that I haven't missed
something important).
Thank you very much in advance.
Vladimir Ivanov,
P. S. I've enclosed the excerption from the .sdo file for this
dataObject below.
Class "SQLObject" ;
Name "doPriorityCount" ;
DataFields {
0 { // first df is a computed column from the first
//table
Class "DataField" ;
Name "dfPriorityDesc" ;...........................................
ComputedColumn "MIN
(MOS.PRIORITY.PDESCRIPTION)" ;............................................
1 { // second df is a computed column from the second
// table
Class "DataField" ;
Name "dfPriorityCount" ;
ComputedColumn "COUNT
(ASSIGNEDTASKSWORKQUEUE.PRIORITYID)" ;
2 { // third df is a regular df
Class "DataField" ;
Name "MOS_PRIORITY_PRIORITYID" ;
TableName "MOS.PRIORITY" ; // this attribute
// doesn't exist for ComputedColumn
ColumnName "PRIORITYID" ; // this attribute
// doesn't exist for ComputedColumn
DataCachingEnabled "False" ;
DataCachingDuration "0" ;
DataCachingMaxRows "200" ;
DataObjectType "Select" ;
Tables "MOS.ASSIGNEDTASKSWORKQUEUE,MOS.PRIORITY,MOS.DEAL" ;
SQLDistinct "False" ;
SelectFilter {
"MOS.DEAL.SCENARIORECOMMENDED" ;
"=" ;
"'Y'" ;
"AND" ;
"MOS.DEAL.COPYTYPE" ;
"<>" ;
"'T'" ;
SelectOrder {
"MOS.PRIORITY.PRIORITYID ASC" ;
SelectGroup {
"MOS.PRIORITY.PRIORITYID" ;
EnableEntireTableDelete "False" ;
EnableEntireTableUpdate "False" ;
SQLTextOverrideSelect "Partial" ;
SQLTextOverrideDelete "None" ;
SQLTextSelectJoin "MOS.ASSIGNEDTASKSWORKQUEUE.DEALID =
MOS.DEAL.DEALID
AND MOS.PRIORITY.PRIORITYID <> 0
AND MOS.PRIORITY.PRIORITYID =
MOS.ASSIGNEDTASKSWORKQUEUE.PRIORITYID(+)
AND
MOS.ASSIGNEDTASKSWORKQUEUE.TASKSTATUSID
(+) = 1 " ;
For more information about JATO, including download information, please
visit:
http://developer.iplanet.com/tech/appserver/framework/index.jsp

Similar Messages

  • Re: [iPlanet-JATO] Sorting a resultset

    Steve,
    Todd will probably address this more, but to set the stage for the discussion,
    I will chime in. As per your scenario "say a user wants to resort the results
    by some other column" , I think there needs to be some clarification on the
    life cycle of the model. You scenario implies that the user sees the data and
    then submits a request to sort the data. This implies that the access to the
    same data is spread across two HTTP requests.
    Unless explicitly or implicitly stored in session, the Model is a per request
    object. Therefore, under ordinary circumstances a new instance of Model is
    constructed per request and populated as needed. This is done for scalability
    reasons. Most applications would not scale properly if all model instances were
    kept around in session per user. There is also the issue of data integrity, a
    model stored in session may not reflect the current state of the RDBMS from
    which the data was previously retrieved, perhaps minutes before. So, the
    default action is to instantiate a new model and repopulate that model The
    normal solution would be to apply the sort criteria to the data retrieval at
    that point.
    What I described above is the norm and the default.
    If you have compelling reasons to prefer a single retrieval style, you have to
    be prepared to store the Model data in session. There are several methods
    within the ModelManager class which assist in this regard. You can see them
    described in the java doc.
    Also bear in mind that the SQLModelBase typically copies the data from the JDBC
    result set into JATO specific local storage. This is done because the JDBC
    result set is not as flexible as developer needs and requires the JDBC
    connection to remain open while it is used.
    I suspect that Todd will describe how you can manipulate the underlying JATO
    specific local storage to change the order. I just wanted to make sure you
    understood the life cycle issues involved and had justification for deviating
    from the default.
    Also, I'm still waiting for followup on the defaultCommandChild issue - we'd
    like to fix it for JATO 1.2.1 if it is a problem and so far your case is the
    only one we have heard of.
    ----- Original Message -----
    From: stephen_winer
    Sent: Wednesday, December 12, 2001 9:42 AM
    Subject: [iPlanet-JATO] Sorting a resultset
    If I want to sort a result set (Model) after the search has taken
    place (say a user wants to resort the results by some other column),
    can this be done without issuing another query? The reason I ask is
    that the next() method in the ResultSetModelBase calls synchronizeRow
    (), which resets the row, which sounds like a sort done outside of
    the SQL would be reverted.
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]

    The hidden field was present in the page, but it looked like this:
    <input type="hidden" name="jato.defaultCommand" value=""../search"">
    Seems like there is a small bug in the code generating this tag.
    FYI - I am using JATO1.2
    What file displays this text? Maybe I can go in and fix it and rejar
    it.
    Steve
    --- Mike Frisino wrote:
    Steve,
    Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
    question?
    >
    <input type="hidden" name="jato.defaultCommand" value="/search">
    To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
    running the sample BasicSample->Field Types and let us know what you
    see.
    >
    Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
    >
    >
    ----- Original Message -----
    From: stephen_winer
    Sent: Friday, December 07, 2001 8:05 AM
    Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
    I am trying to set the defaultCommandChild in my jato:form tag to be
    the searcg button. The search button definition is:
    <jato:button name="search"/>.
    The form tag definition is:
    <jato:form name="PendingIA" defaultCommandChild="/search">
    Clicking on the search button works fine, but hitting return in one
    of the textFields (which submits the form) passes a value of "" to
    the createChild method in my viewBean, which throws an error. Why
    does this not just work as normal and trigger the handleSearchRequest
    () method?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] onBeforeRequest(); Finding requested view from requestContext

    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object) has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following in onBeforeRequest:
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there is more
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c
    nickmalthus wrote:
    I am implementing a custom security model since the standard J2EE
    security model does not allow me access to the users password, which I
    need to log into a third party application. I have overriden the
    onBeforeRequest() method to check to see if the user is logged in, and
    if not, forward to the Login ViewBean. However, I need to determine
    what page/viewbean the request is attempting to access so I can let it
    pass through if it is accessing the Login viewbean and to forward to
    the requested view once the user is logged in. What is the best way to
    do this? I see no obvious uitility in the javadocs
    TIA
    For more information about JATO, including download information, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    I guess what I am thinking about doing is capturing the requested URL,
    i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
    would then check to see if the user is logged in, and if not, set the
    URL in the session(or page session of the Login bean) and forward to
    the Login viewbean using the viewbean manager. Inside the login view
    in the handleSubmit() method I would authenticate the user and then
    get the URL out of the session (or pagesession). I would then
    magically get the ViewBean/Command object for the URL or otherwise
    "forward the request" as if the user had typed in
    /appname/modulename/RequestName, which is the behavior I am trying to
    acheive.
    It turns out I cannot forward in the onBeforeRequest() as it will
    output the viewbean and then continue to process the request which in
    turn trys to do a RequestDispatcher().forward after data has been
    written to the stream which does not bode well with the servlet
    container. Thus, it appears I have no control of the request in the
    onBeforeRequest() method. Is this correct?
    In light of this new observation I am now going to create a base view
    class that all views will extend from and override the
    onSecurityCheck() method to forward to my login bean. If I can't find
    any other way, I will get the URL from the page session and do a
    response.sendRedirect() to the URL.
    Thanks for the help!
    --- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object)has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following inonBeforeRequest:
    >
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there ismore
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c

  • Re: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from requestContext

    If you want to stop a JATO request in its tracks, you have a little black
    magic at your disposal: you can throw a CompleteRequestException. This
    indicates to the JATO infrastructure that it should immeditately stop
    handling the request, but not generate an error, as the develper has taken
    full control. You can generally throw this error from anywhere, at any
    point--it is a RuntimeException, and is "tunneled" through other exception
    handlers where appropriate.
    In your scenario, you want to check if the user is logged in, and if not,
    save the target URL using the parsePathInfo() method. Then, forward to the
    login page and then throw a CompleteRequestException.
    Todd
    ----- Original Message -----
    From: "nickmalthus" <nickmalthus@h...>
    Sent: Monday, January 07, 2002 3:05 PM
    Subject: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from
    requestContext
    I guess what I am thinking about doing is capturing the requested URL,
    i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
    would then check to see if the user is logged in, and if not, set the
    URL in the session(or page session of the Login bean) and forward to
    the Login viewbean using the viewbean manager. Inside the login view
    in the handleSubmit() method I would authenticate the user and then
    get the URL out of the session (or pagesession). I would then
    magically get the ViewBean/Command object for the URL or otherwise
    "forward the request" as if the user had typed in
    /appname/modulename/RequestName, which is the behavior I am trying to
    acheive.
    It turns out I cannot forward in the onBeforeRequest() as it will
    output the viewbean and then continue to process the request which in
    turn trys to do a RequestDispatcher().forward after data has been
    written to the stream which does not bode well with the servlet
    container. Thus, it appears I have no control of the request in the
    onBeforeRequest() method. Is this correct?
    In light of this new observation I am now going to create a base view
    class that all views will extend from and override the
    onSecurityCheck() method to forward to my login bean. If I can't find
    any other way, I will get the URL from the page session and do a
    response.sendRedirect() to the URL.
    Thanks for the help!
    --- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object)has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following inonBeforeRequest:
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there ismore
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    If you want to stop a JATO request in its tracks, you have a little black
    magic at your disposal: you can throw a CompleteRequestException. This
    indicates to the JATO infrastructure that it should immeditately stop
    handling the request, but not generate an error, as the develper has taken
    full control. You can generally throw this error from anywhere, at any
    point--it is a RuntimeException, and is "tunneled" through other exception
    handlers where appropriate.
    In your scenario, you want to check if the user is logged in, and if not,
    save the target URL using the parsePathInfo() method. Then, forward to the
    login page and then throw a CompleteRequestException.
    Todd
    ----- Original Message -----
    From: "nickmalthus" <nickmalthus@h...>
    Sent: Monday, January 07, 2002 3:05 PM
    Subject: [iPlanet-JATO] Re: onBeforeRequest(); Finding requested view from
    requestContext
    I guess what I am thinking about doing is capturing the requested URL,
    i.e. /appname/modulename/RequestName. In the onBeforeRequest(). I
    would then check to see if the user is logged in, and if not, set the
    URL in the session(or page session of the Login bean) and forward to
    the Login viewbean using the viewbean manager. Inside the login view
    in the handleSubmit() method I would authenticate the user and then
    get the URL out of the session (or pagesession). I would then
    magically get the ViewBean/Command object for the URL or otherwise
    "forward the request" as if the user had typed in
    /appname/modulename/RequestName, which is the behavior I am trying to
    acheive.
    It turns out I cannot forward in the onBeforeRequest() as it will
    output the viewbean and then continue to process the request which in
    turn trys to do a RequestDispatcher().forward after data has been
    written to the stream which does not bode well with the servlet
    container. Thus, it appears I have no control of the request in the
    onBeforeRequest() method. Is this correct?
    In light of this new observation I am now going to create a base view
    class that all views will extend from and override the
    onSecurityCheck() method to forward to my login bean. If I can't find
    any other way, I will get the URL from the page session and do a
    response.sendRedirect() to the URL.
    Thanks for the help!
    --- In iPlanet-JATO@y..., "Craig V. Conover" <craig.conover@s...> wrote:
    The problem is that you don't know what the target view is until it has
    been forwarded to.
    Think about it... the request handling view bean (or command object)has
    the request handler that has the code that will ultimately forward to
    another view bean. This is code that you have written. So, until that
    forwardTo() is invoked, there is no notion of a "target page".
    What you do know is which "page" (view bean) the request is coming from
    (the handling view bean or command class). You can get this from the
    HttpServletRequest. The attribute name is "viewBean".
    So you can get the view bean name by doing the following inonBeforeRequest:
    <HttpServletRequest>.getAttribute("viewBean");
    But I suspect this is not going to solve your current issue.
    You could add the target page name to the page session. If there ismore
    than one possible target page, it might get a little more involved.
    Let me know if the use of page session needs further explanation.
    c
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

  • Re: [iPlanet-JATO] Re: Translation hangs tool (retitled Custom Superclasses and warning T008)

    Sonal,
    I believe that you are misinterpreting the documentation.
    I understand that PgCommon has to extend ViewBeanBase. I tried to
    make the following changes in PgCommon and compiled it. Then I ran
    the extraction which threw up the following error:
    I believe that you are confusing extraction issues with translation issues.
    The warning message that indicates the need for a class mapping strategy to
    address custom superclasses in the original project is a TRANSLATION time
    warning.
    T008 No mapping found for [<ndClassType>]
    Falling back to [Object]. Please add entry for [<ndClassType>] to
    class mapping file, restart the toolbox and re-run the translation.
    As such, the remedy for this warning is detailed in the documentation under
    the heading
    Extraction/Translation Error & Warning Messages
    3.3 Notes on MigrationClassMappings.properties
    It sounds to me that you have misinterpreted the instructions and have
    attempted to modify the original PgCommon declaration, and then re-extract.
    This is incorrect. This implies that you see this as an extraction tool
    situation, which it is not. This is a translation tool consideration, and as
    such does not require any adjustment of the original NetDynamics' object. So
    please, return to the original PgCommon declaration, and recompile. Then run
    the extraction tool. Then run the translation tool, and make note of the
    translation tool warnings and deal with them.
    As indicated in the documentation (although perhaps not clearly enough), the
    solution to warning T008 is not to make your original PgCommon extend
    ViewBeanBase, but rather to adjust the MigrationClassMappings.properties so
    that the TRANSLATION tool will take your class mappings into account when it
    translates the ND objects into JATO objects.
    Specifically, if you add the following entry into the
    MigrationClassMappings.properties file:
    PgCommon PgCommonViewBean
    then the translation tool will cause all classes which previously extended
    PgCommon to be translated into new classes which now extend
    PgCommonViewBean.
    Your final step is to adjust PgCommonViewBean's constructor. Note, we are
    talking about PgCommonViewBean here (i.e. the output of the Translation
    tool, not the original ND object).
    Change it from this:
    public PgCommonViewBean()
    super(PAGE_NAME);
    setDefaultDisplayURL(DEFAULT_DISPLAY_URL);
    registerChildren();
    initialize();
    TO THIS
    public PgCommonViewBean(String name)
    // Adjust the constructor because this is a superclass
    // of the other viewbeans. It is NOT a stand along page
    // Therefore its constructor should be adjusted to pass the
    // page name argument up to the ViewBeanBase class
    super(name);
    /* Delete the following lines, they are not needed if this is acting as a
    superclass of other viewbeans.
    setDefaultDisplayURL(DEFAULT_DISPLAY_URL);
    registerChildren();
    initialize();
    ----- Original Message -----
    From: "Todd Fast" <toddwork@c...>
    Sent: Wednesday, April 25, 2001 5:16 PM
    Subject: Re: [iPlanet-JATO] Re: Translation hangs tool
    Sonal--
    Have you tried recompiling the entire application? It sounds as if theremay
    be a problem with incompatible versions of PgCommon and PgReplaceCDSIDwhich
    I assume extends it. Blow away all your project class files and recompile
    in the ND Studio before trying again.
    Also, make sure there are no .ser files hanging around in your project
    directory.
    Todd
    ----- Original Message -----
    From: <ssingh@n...>
    Sent: Wednesday, April 25, 2001 6:56 AM
    Subject: [iPlanet-JATO] Re: Translation hangs tool
    Todd/Charles,
    Thans for all the help.
    The client has a small application, in which all pages extend from
    PgCommon. PgCommon extends CSpPage. I read through the "Notes on
    MigrationClassMappings.properties" file in iMT1.1.1 documentation.
    I understand that PgCommon has to extend ViewBeanBase. I tried to
    make the following changes in PgCommon and compiled it. Then I ran
    the extraction which threw up the following error:
    java.lang.VerifyError: (class: prHRAdminDE/PgReplaceCDSID, method:
    stLinkToHome_onBeforeDisplayEvent signature:
    (Lspider/event/CSpDisplayEvent;)I) Incompatible object argument for
    function call
    at java.lang.ClassLoader.resolveClass0(Native Method)
    at java.lang.ClassLoader.resolveClass(ClassLoader.java:545)
    at spider.util.CSpClassLoader.loadClass(CSpClassLoader.java,
    Compiled Code)
    at spider.util.CSpClassLoader.loadClassWithPackage
    (CSpClassLoader.java:291)
    at spider.util.CSpClassLoader.loadClassWithPackage
    (CSpClassLoader.java:217)
    at spider.util.CSpClassName.instantiate(CSpClassName.java:180)
    at spider.intrp.CSpIntrpModel.createModel
    (CSpIntrpModel.java:945)
    at spider.intrp.CSpIntrpModel.createNodeObject
    (CSpIntrpModel.java:282)
    at spider.intrp.CSpIntrpModel.open(CSpIntrpModel.java:500)
    at spider.CSpProject.readPostV40ChildObjects(CSpProject.java,
    Compiled Code)
    at spider.CSpProject.readObject(CSpProject.java:806)
    at spider.intrp.CSpIntrpModel.createNodeObject
    (CSpIntrpModel.java:293)
    at spider.intrp.CSpIntrpModel.open(CSpIntrpModel.java:500)
    at spider.intrp.CSpIntrpModel.open(CSpIntrpModel.java:479)
    at spider.CSpider.instantiateFirstProjectInstance
    (CSpider.java:6404)
    at spider.CSpider.createAndSetNewProjectInstance
    (CSpider.java:6187)
    at spider.CSpider.allocateProjectUserContext
    (CSpider.java:5471)
    at spider.CSpider.preloadProjects(CSpider.java, Compiled Code)
    at spider.CSpider.initialize(CSpider.java:542)
    at com.iplanet.moko.netdyn.extract.PseudoCP.createProjects
    (PseudoCP.java:136)
    at com.iplanet.moko.netdyn.extract.PseudoCP.initialize
    (PseudoCP.java:106)
    at com.iplanet.moko.netdyn.extract.PseudoCP.<init>
    (PseudoCP.java, Compiled Code)
    at com.iplanet.moko.netdyn.tools.ExtractTool.invoke
    (ExtractTool.java, Compiled Code)
    at com.iplanet.moko.tools.gui.ToolInvocationThread.run
    (ToolInvocationThread.java, Compiled Code)
    ===================================
    Any more documentation availbale on how to migrate a common base
    page? I beleive that it would be a fairly common issue in NetD
    migrations.
    ===================================
    New PgCommon
    public class PgCommon extends ViewBeanBase implements ViewBean
    //]]SPIDER_CLASS END
    //[[SPIDER_EVENTS BEGIN
    public static boolean DEBUG = true;
    //[[SPIDER_EVENT<this_onAfterInitEvent>
    public PgCommon()
    super("PgCommon");
    public void this_onAfterInitEvent(CSpInitEvent event){
    Properties props =
    HRAdminProperties.getInstance();
    DEBUG = (props.getProperty
    ("hronlineadmin.debug").equals("TRUE"))?true:false;
    //CSpLog.setSendErrorsToHtml(false);
    //return (PROCEED);
    //]]SPIDER_EVENT<this_onAfterInitEvent>
    //]]SPIDER_EVENTS END

  • Re: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & & onSessionTimeoutEvent

    My mistake. Thanks for the clarification, Craig.
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@s...>
    Sent: Friday, January 04, 2002 11:14 AM
    Subject: Re: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    Alex,
    In addition to Todd saying that the ND security object "is nothing morethan a
    sessionable object...", remember that the security object did nothing morethan
    retrieve the user profile from some persistent store: a database or athird party
    API. So the security object was just a very specialized model (a dataobject in ND
    terms, of course), although it need not be a model, it could just be anarbitrary
    Java class, whatever works best.
    Once the security object was triggered to perform a user profile lookup,the
    profile was stored in an instance of CSpUserProfile and kept in the user's
    session. The project object was then the object that was responsible forchecking
    the user profile for privileges, previous pages, and db logins and such.As Todd
    explained, the ViewBean API now does the security check (as opposed toJATO's
    module servlet, or ND's project object), so extending ViewBeanBase andoverriding
    securityCheck is a convenient way to mimic ND's security hooks. You couldeven
    override a method or event in the module servlet to do a lookup if youwant a
    greater parallel to ND, but this is unneccessary. Either way, the securitycheck
    is performed before the "page" is "loaded".
    c
    Todd Fast wrote:
    Agreed. This is partly why we have never added such a feature to JATO
    (though we've talked about it many many times), because it seemed too
    prescriptive and possibly at odds with the other solutions people favor.
    We're still on the fence. We want to add it, but feel it'll take a fair
    bit
    of design to do properly and extensibly.
    However, realize that the ND security object is nothing more than a
    sessionable object with slots for username, password, and priveleges.This
    is almost trivially easy to replicate on your own, with a small additionof
    code to automatically handle lifecycle and security checking. It wouldbe
    extremely easy to create a subclass of ViewBeanBase that would overridethe
    securityCheck() method to check the state of a sessioned "user profile"
    object. Add to the ViewBean a declared set of "privelege" strings, andyou
    can check the profile object against those required.
    I feel I'm being unclear--do you see where I'm going?
    Todd
    ----- Original Message -----
    From: "njdoe123" <first.us@a...>
    Sent: Friday, December 28, 2001 6:44 AM
    Subject: [iPlanet-JATO] Re: onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    Hi,
    We used a lot of "security object" in netD projects. Each used
    username, password and privilege for login. After migration,
    we have to hand code all login codes manually. Session control
    is pretty standard in j2ee, i'm wondering whether there is a
    best practice example available for netD login feature.
    Since security was one of the outstanding feature in netD, it will
    be a great idea to have a stadard plugin to support this feature
    after migration. I wish v1.2 could supply a direction, although
    there are several login methods in j2ee.
    Thanks,
    Alex Lin
    --- In iPlanet-JATO@y..., "Todd Fast" <todd.fast@s...> wrote:
    Small correction: the name of the method in ViewBean is"securityCheck()",
    not "onSecurityCheck()". The method would've been better named
    "checkSecurity()", but too late now. <grin>
    Todd
    ----- Original Message -----
    From: "Craig V. Conover" <craig.conover@s...>
    Sent: Monday, December 17, 2001 12:47 PM
    Subject: Re: [iPlanet-JATO] onSecurityCheckFailedEvent & &
    onSessionTimeoutEvent
    The iMT has a ND to JATO/J2EE mapping document that covers ND
    events and
    common ND class/variable/method mapping.
    To answer you two questions below:
    onSessionTimoutEvent is onSessionTimeout in JATO and can beoverriden in
    any class the subclasses JATO'scom.iplanet.jato.ApplicationServletBase.
    Typically, this is done in you application servlet class which allof
    your module servlets in the application will subclass.
    onSecurityCheckFailedEvent is an ND specific event that istriggered
    when a Security exception is thrown in ND. In JATO, a
    SecurityCheckException is thrown when the default securitychecking in
    JATO fails. JATO's default security is to make sure theRequestContext
    object is not null. This is done in the ViewBean API. The
    onSecurityCheck event in JATO allows you to hook into thisbehavior and
    write your own security checking, or hook in a third party API.You can
    call super so that you still get the RequextContext null check.
    You should create a "non-visual" ViewBean (behavior only) thatoverrides
    the onSecurityCheck event, and all other ViewBeans in yourapplication
    extend it to inherit this security checking behavior.
    You could also hook in the security in your application Servlet by
    overriding one of the events in ApplicationServletBase, like
    onBeforeRequest.
    craig
    njdoe123 wrote:
    Hi,
    We have the following two events (onSecurityCheckFailedEvent
    & onSessionTimeoutEvent) across all ND projects. I guess
    it's pretty common for netdynamics project.
    How do you solve the corresponding issues in j2ee ?
    Is there any example available ?
    Thanks,
    Alex
    //[[SPIDER_EVENT<this_onSecurityCheckFailedEvent>
    public int this_onSecurityCheckFailedEvent
    (CSpProjectSecurityEvent event)
    switch (event.getFailureType() )
    case NEW_SECURITY_CHECK_PRIV_FAILURE_TYPE:
    // do something
    CSpPage loginPage1 = CSpider.getPage("PgLogin");
    CSpString msg1 = new CSpString("Wrong District Code, UserID
    or
    Password. Try again.");
    loginPage1.setDisplayFieldValue("StMsg1", msg1);
    loginPage1.load (false);
    break;
    case SESSION_CONTINUITY_FAILURE_TYPE:
    // do something else
    CSpPage loginPage2 = CSpider.getPage("PgLogin");
    CSpString msg2 = new CSpString("You must login first...");
    loginPage2.setDisplayFieldValue("StMsg1", msg2);
    loginPage2.load (false);
    break;
    return (STOP);
    //]]SPIDER_EVENT<this_onSecurityCheckFailedEvent>
    //[[SPIDER_EVENT<this_onSessionTimeoutEvent>
    public int this_onSessionTimeoutEvent(CSpProjectSessionEventevent)
    CSpString msg3 = new CSpString("You were gone too long - login
    again");
    CSpPage loginPage3 = CSpider.getPage("PgLogin");
    loginPage3.setDisplayFieldValue("StMsg1", msg3);
    // stop any further processing of this original user request
    loginPage3.setDisplayFieldValue("District_ID", newCSpString(""));
    loginPage3.setDisplayFieldValue("User_ID", new CSpString(""));
    loginPage3.setDisplayFieldValue("Password", newCSpString(""));
    loginPage3.load (false);
    return (PROCEED);
    //]]SPIDER_EVENT<this_onSessionTimeoutEvent>
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    For more information about JATO, including download information,
    please
    visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    Thank you - Jin and Todd.
    Will try that.
    Atul
    --- In iPlanet-JATO@y..., Byung Jin Chun <bchun@n...> wrote:
    try using kregedit and modify the key for the jvm args, using the -x
    parameters for the 1.2 runtime
    Jin
    -----Original Message-----
    From: Todd Fast [mailto:<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066208071048">Todd.Fast@S...</a>]
    Sent: Tuesday, February 19, 2002 8:40 PM
    Subject: Re: [iPlanet-JATO] Re: OutOfMemoryError
    Atul--
    Out of curiosity - How do you modify the memory parameters for
    the container's VM ?? I know I should try to do some research but
    figured you may already have some insight and willingness to
    share.
    Please consider this as low priority.It differs by container; I don't remember details of any particular one.
    >
    Todd
    For more information about JATO, including download information, please
    visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    <http://developer.iplanet.com/tech/appserver/framework/index.jsp>
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] Double Trouble

    Looks like the attachment will not be inlined by egroup's mailer so here is
    the table i was trying to send before:
    Current Type mapping (appologies for lousy formatting)
    ND ColumnDataType DATA_FIELD_TYPE_MAP
    DATA_FIELD_SQL_TYPE_MAP
    NO_TYPE String
    java.sql.Types.VARCHAR
    CHAR_TYPE String
    java.sql.Types.CHAR
    UNSIGNED_CHAR_TYPE String
    java.sql.Types.CHAR
    TINY_TYPE Short
    java.sql.Types.SMALLINT
    UNSIGNED_TINY_TYPE Short
    java.sql.Types.SMALLINT
    SHORT_TYPE Short
    java.sql.Types.SMALLINT
    UNSIGNED_SHORT_TYPE Short
    java.sql.Types.SMALLINT
    INT_TYPE Integer
    java.sql.Types.INTEGER
    UNSIGNED_INT_TYPE Integer
    java.sql.Types.INTEGER
    LONG_TYPE Long
    java.sql.Types.BIGINT
    UNSIGNED_LONG_TYPE Long
    java.sql.Types.BIGINT
    FLOAT_TYPE Float
    java.sql.Types.FLOAT
    DOUBLE_TYPE Double
    java.sql.Types.DOUBLE
    DECIMAL_TYPE java.math.BigDecimal
    java.sql.Types.DECIMAL
    DATE_TYPE java.sql.Date
    java.sql.Types.DATE
    DATETIME_TYPE java.sql.Timestamp
    java.sql.Types.TIMESTAMP
    DURATION_TYPE DONT_KNOW_CLASS_TYPE
    DONT_KNOW_CLASS_TYPE
    STRING_TYPE String
    java.sql.Types.VARCHAR
    BLOB_TYPE Object
    java.sql.Types.BLOB
    UNQUOTED_STRING_TYPE DONT_KNOW_CLASS_TYPE DONT_KNOW_CLASS_TYPE
    BOOLEAN_TYPE Boolean
    java.sql.Types.BINARY
    USER_DEFINED_TYPE DONT_KNOW_CLASS_TYPE
    java.sql.Types.JAVA_OBJECT
    Translation Tool Type Mapping Structures
    The current code generation structures that are responsible for supporting
    these type mappings at translation times are as follows:
    CodeGeneration.DATA_FIELD_TYPE_MAP
    The map is constructed from two arrays:
    CodeGeneration. ND_DATA_FIELD_DATA_TYPES
    CodeGeneration. MIGRATION_MODEL_DATA_TYPES
    CodeGeneration. DATA_FIELD_SQL_TYPE_MAP
    The map is constructed from two arrays:
    CodeGeneration. ND_DATA_FIELD_DATA_TYPES
    CodeGeneration. MIGRATION_MODEL_DATA_TYPES
    JATO Type Values
    The following JATO field values or member types are generated at translation
    time based on the type mappings:
    Model Field typing
    Model.member field type - drawn from CodeGeneration .DATA_FIELD_TYPE_MAP
    Descriptor typing
    QueryFieldDescriptor.fieldClass
    - drawn from CodeGeneration .DATA_FIELD_TYPE_MAP
    StoredProcParameterDescriptor.fieldClass
    - drawn from CodeGeneration .DATA_FIELD_TYPE_MAP
    StoredProcParameterDescriptor.sqlType
    - drawn from CodeGeneration.DATA_FIELD_SQL_TYPE_MAP
    ----- Original Message -----
    From: Mike Frisino <Michael.Frisino@S...>
    Sent: Thursday, January 04, 2001 12:19 PM
    Subject: Re: [iPlanet-JATO] Double Trouble
    Thanks John,
    Can you provide some more information that would help resolve this issue.
    It could be that the mapping rules we use during the translation need tobe
    adjusted.
    Specifically, what were the following ND property values you had for the
    field in question:
    ND Datafield property "ColumnDataType"
    ND Datafield property "ColumnDataTypeText"
    ND Datafield property "NativeType"
    ND Datafield property "NativeTypeText"
    You see, during the translation we had to choose to map from the originalND
    type information to a corresponding java or java.sql type.
    We were not certain whether to favor ND's "ColumnDataType" or ND's
    "NativeType" value.
    We came up with rules based on mapping ND's ColumnDataType. Those rulesare
    detailed in the attachment.
    ----- Original Message -----
    From: <john.teceno@b...>
    Sent: Thursday, January 04, 2001 7:33 AM
    Subject: [iPlanet-JATO] Double Trouble
    Hey Guys,
    I've run across a problem retrieving Doubles back from an Oracle
    Database. The field is defined as a Number. When we converted the
    program from NetD, it was created with return values of Double. What
    is returned is not the correct value. For example, in the table the
    value is 123456, when I do a getInternalID(), it is returning 2.0. I
    am working on a work around, but I thought that I would post this
    anyway.
    John Teceno
    Back Bay Technologies
    [email protected]
    [Non-text portions of this message have been removed]
    [email protected]

    Thank you - Jin and Todd.
    Will try that.
    Atul
    --- In iPlanet-JATO@y..., Byung Jin Chun <bchun@n...> wrote:
    try using kregedit and modify the key for the jvm args, using the -x
    parameters for the 1.2 runtime
    Jin
    -----Original Message-----
    From: Todd Fast [mailto:<a href="/group/SunONE-JATO/post?protectID=101233080150035167169232031248066208071048">Todd.Fast@S...</a>]
    Sent: Tuesday, February 19, 2002 8:40 PM
    Subject: Re: [iPlanet-JATO] Re: OutOfMemoryError
    Atul--
    Out of curiosity - How do you modify the memory parameters for
    the container's VM ?? I know I should try to do some research but
    figured you may already have some insight and willingness to
    share.
    Please consider this as low priority.It differs by container; I don't remember details of any particular one.
    >
    Todd
    For more information about JATO, including download information, please
    visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    <http://developer.iplanet.com/tech/appserver/framework/index.jsp>
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] Re: using begin childName Display method

    Steve,
    It sounds like you have your display fields in a container view, and
    that container view is inside of a view bean. I haven't tested whether
    the fireChildDisplayEvents has a "deep" effect on its container view
    children. Meaning that you may have to set fireChildDisplayEvents="true"
    for the <jato:containerView> tag instead. If all else fails and you need
    to just get it working, you can set the fireDisplayEvents="true" for
    each display field tag separately.
    craig
    stephen_winer wrote:
    I should clarify my earlier statement. The data I want to display is
    coming from a model (tied in in the createChild method). I want to
    conditionally reformat the text that is being substituted in the JSP
    for a JATO form element, but I want this to happen on the server, not
    with JavaScript. The begin<childName>Display and
    end<childName>Display methods allow me to do this, in theory, but I
    can not get them to execute.
    Steve
    --- In iPlanet-JATO@y..., Belinda Garcia <belinda.garcia@s...> wrote:
    I don't currently use a begin or end Display method. I merely bind
    the fields to
    the model when the child is created and use the setValue to
    initially set the
    value to what's in the model. I get nulls though if I try to use a
    tiled View. I
    haven't quite got this figured out.
    Belinda
    X-eGroups-Return:
    sentto-2343287-1135-1008613974-belinda.garcia=sun.com@r...
    X-Sender: stephen_winer@y...
    User-Agent: eGroups-EW/0.82
    From: "stephen_winer" <stephen_winer@y...>
    X-Originating-IP: 155.188.191.4
    X-Yahoo-Profile: stephen_winer
    Mailing-List: list iPlanet-JATO@y...; contact
    iPlanet-JATO-owner@y...
    Date: Mon, 17 Dec 2001 18:32:48 -0000
    Subject: [iPlanet-JATO] using begin<childName>Display method
    Content-Transfer-Encoding: 7bit
    I want to be able to conditionally show/hide data as well as
    format
    it for display without touching the model. I found the
    begin<childName>Display and end<childName>Display methods that
    provide the hooks to do this, but I have been unsuccessful in
    getting
    these method to execute. I added the
    fireChildDisplayEvents="true"
    attribute to the jato:useViewBean tag, but this has not helped.
    I
    also added some debug to the ContainerViewBase class in the
    public
    boolean beginChildDisplay(ChildDisplayEvent event) method to see
    what
    was happening. The displayMethodMap was returning null for the
    child
    display methods that were in the view bean. I covered all the
    bases
    (compiling, redeploying, etc.) and nothing has worked. Is there
    anything I am missing or is there some working example of this?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    >For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    The hidden field was present in the page, but it looked like this:
    <input type="hidden" name="jato.defaultCommand" value=""../search"">
    Seems like there is a small bug in the code generating this tag.
    FYI - I am using JATO1.2
    What file displays this text? Maybe I can go in and fix it and rejar
    it.
    Steve
    --- Mike Frisino wrote:
    Steve,
    Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
    question?
    >
    <input type="hidden" name="jato.defaultCommand" value="/search">
    To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
    running the sample BasicSample->Field Types and let us know what you
    see.
    >
    Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
    >
    >
    ----- Original Message -----
    From: stephen_winer
    Sent: Friday, December 07, 2001 8:05 AM
    Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
    I am trying to set the defaultCommandChild in my jato:form tag to be
    the searcg button. The search button definition is:
    <jato:button name="search"/>.
    The form tag definition is:
    <jato:form name="PendingIA" defaultCommandChild="/search">
    Clicking on the search button works fine, but hitting return in one
    of the textFields (which submits the form) passes a value of "" to
    the createChild method in my viewBean, which throws an error. Why
    does this not just work as normal and trigger the handleSearchRequest
    () method?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] using begin childName Display method

    Oops. Sorry about that, Craig. I didn't realize I might leave that impression.
    I'm sure the tiled
    views work since you have so many examples of these and it's a relatively
    simple concept, isn't it?
    Not to mention a necessary one. I didn't have time to debug my code and find
    out what I was doing
    wrong where the tiled views are concerned. I decide to just try to implement
    tiled views later and
    just stick with one of everything for now and get that working.
    Yes, I have reviewed your comments and am taking them into consideration. I am
    able to save and
    retrieve values with my model at this point.
    Thanks.
    Belinda
    X-eGroups-Return:
    sentto-2343287-1143-1008622698-belinda.garcia=sun.com@r...
    X-Sender: craig.conover@s...
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4)Gecko/20011019 Netscape6/6.2
    X-Accept-Language: en-us
    From: "Craig V. Conover" <craig.conover@s...>
    X-Yahoo-Profile: cvconover
    Mailing-List: list [email protected]; contact
    [email protected]
    Date: Mon, 17 Dec 2001 13:00:10 -0800
    Subject: Re: [iPlanet-JATO] using begin<childName>Display method
    Content-Transfer-Encoding: 7bit
    Belinda,
    He may also be binding the models, howerver, he needs to change the way
    the value appears before it is displayed which is why you would use the
    display events.
    Your null value issue is a completely different issue and has nothing to
    do with it being a tiled view. I don't want anyone getting the idea
    that the tiledView binding is broken. It does work. You issue should
    have something to do with the inconsistent way in which you are getting
    your model. At least from what I could tell in your source code that you
    sent me.
    Have you reviewed my comments I sent to you in your source code?
    craig
    Belinda Garcia wrote:
    I don't currently use a begin or end Display method. I merely bind the
    fields to
    the model when the child is created and use the setValue to initially setthe
    value to what's in the model. I get nulls though if I try to use a tiledView. I
    haven't quite got this figured out.
    Belinda
    X-eGroups-Return:
    sentto-2343287-1135-1008613974-belinda.garcia=sun.com@r...
    X-Sender: stephen_winer@y...
    User-Agent: eGroups-EW/0.82
    From: "stephen_winer" <stephen_winer@y...>
    X-Originating-IP: 155.188.191.4
    X-Yahoo-Profile: stephen_winer
    Mailing-List: list [email protected]; contact
    [email protected]
    Date: Mon, 17 Dec 2001 18:32:48 -0000
    Subject: [iPlanet-JATO] using begin<childName>Display method
    Content-Transfer-Encoding: 7bit
    I want to be able to conditionally show/hide data as well as format
    it for display without touching the model. I found the
    begin<childName>Display and end<childName>Display methods that
    provide the hooks to do this, but I have been unsuccessful in getting
    these method to execute. I added the fireChildDisplayEvents="true"
    attribute to the jato:useViewBean tag, but this has not helped. I
    also added some debug to the ContainerViewBase class in the public
    boolean beginChildDisplay(ChildDisplayEvent event) method to see what
    was happening. The displayMethodMap was returning null for the child
    display methods that were in the view bean. I covered all the bases
    (compiling, redeploying, etc.) and nothing has worked. Is there
    anything I am missing or is there some working example of this?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    The hidden field was present in the page, but it looked like this:
    <input type="hidden" name="jato.defaultCommand" value=""../search"">
    Seems like there is a small bug in the code generating this tag.
    FYI - I am using JATO1.2
    What file displays this text? Maybe I can go in and fix it and rejar
    it.
    Steve
    --- Mike Frisino wrote:
    Steve,
    Can you check the HTML source that shows up in the browser? Do you see an entry that looks like this at the bottom of the form in
    question?
    >
    <input type="hidden" name="jato.defaultCommand" value="/search">
    To answer your question - it should work as you described. Some of the JatoSample make use of the defaultCommandChild. Can you try
    running the sample BasicSample->Field Types and let us know what you
    see.
    >
    Failing this you can send me your jsp file , maybe there is some subtle issue there. michael.frisino@s...
    >
    >
    ----- Original Message -----
    From: stephen_winer
    Sent: Friday, December 07, 2001 8:05 AM
    Subject: [iPlanet-JATO] Using the defaultCommandChild in a form
    I am trying to set the defaultCommandChild in my jato:form tag to be
    the searcg button. The search button definition is:
    <jato:button name="search"/>.
    The form tag definition is:
    <jato:form name="PendingIA" defaultCommandChild="/search">
    Clicking on the search button works fine, but hitting return in one
    of the textFields (which submits the form) passes a value of "" to
    the createChild method in my viewBean, which throws an error. Why
    does this not just work as normal and trigger the handleSearchRequest
    () method?
    Steve
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] sp3 jsp compiler problem

    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text
    substitution situations, and as a completely independent tool its use is not
    restricted to migration situations (or file types for that matter).
    Second, I sympathize with the unfortunate trouble you are experiencing due to
    Jasper's (perhaps more strict) compilation, but in what way did the iMT
    automated translation contribute to these inconsistencies that you cited?
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a
    translation situation, the only way "OnClick" would have been introduced was if
    it had been part of the pre-existing project's "extraHTML" (which was written
    by the original customer and just passed through unchanged by the iMT) or if it
    was added manually by the post-migration developer.
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be
    similar to the OnClick situation described above?
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no
    equivalent in the NetDynamics world, so any content tags in your code must have
    been introduced by your developers manually. Its a shame that jasper is so
    particular, but the iMT could not help you out here even if we wanted to. The
    constants that are used by the iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can see, the
    only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174144234026000079108238073194105057099246073154180137239239223019162">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    [Non-text portions of this message have been removed]

    Thanks a lot Matt and Mike for your prompt replies.
    I agree completely that iMT doesn't introduce the inconsistencies.
    About the three cases I mentioned, the third one happens only in
    manually created JSPs. So it has nothing to do with iMT. The first
    two are mainly due to the existing HTML code, as you rightly pointed
    out.
    The reason I made the suggestion is since we know that case 1 and 2
    won't pass the japser compiler in sp3, we have to do something about
    it. The best place to do this, in my mind, is iMT. Of course, there
    might be some twists that make it impossible or difficult to do this
    kind of case manipulation or attribute discard.
    Weiguo
    --- In iPlanet-JATO@y..., "Mike Frisino" <Michael.Frisino@S...> wrote:
    Weiguo,
    First, Matt is correct, the regular expression tool is perfect for general text substitution situations, and as a completely independent
    tool its use is not restricted to migration situations (or file types
    for that matter).
    >
    Second, I sympathize with the unfortunate trouble you are experiencing due to Jasper's (perhaps more strict) compilation, but
    in what way did the iMT automated translation contribute to these
    inconsistencies that you cited?
    >
    1. Changed the case of the tag attribute to be the same as what's
    defined in tld.
    example: changed OnClick to onClick
    The iMT does not generate any OnClick or onClick clauses per se. In a translation situation, the only way "OnClick" would have been
    introduced was if it had been part of the pre-existing
    project's "extraHTML" (which was written by the original customer and
    just passed through unchanged by the iMT) or if it was added manually
    by the post-migration developer.
    >
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.Can you give soem examples? Is there a definite pattern? Again, this might be similar to the OnClick situation described above?
    >
    >
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    Again, the content tag would never have been generated by the iMT. There was no equivalent in the NetDynamics world, so any content tags
    in your code must have been introduced by your developers manually.
    Its a shame that jasper is so particular, but the iMT could not help
    you out here even if we wanted to. The constants that are used by the
    iMT are defined in
    com.iplanet.moko.jsp.convert.JspConversionConstants. From what I can
    see, the only situation of a closing tag with any space in it is
    public static final String CLOSE_EMPTY_ELEMENT = " />";
    But that should not cause the type of problem you are referring to.
    Mike
    ----- Original Message -----
    From: Matthew Stevens
    Sent: Thursday, September 06, 2001 10:16 AM
    Subject: RE: [iPlanet-JATO] sp3 jsp compiler problem
    Weiguo,
    Others will chime in for sure...I would highly recommend the Regex Tool from
    the iMT 1.1.1 for tackling this type of problem. Mike, Todd and myself have
    posted to the group (even recently) on directions and advantages of creating
    your own RULES (rules file) in XML for arbitary batch processing of source.
    >
    matt
    -----Original Message-----
    From: weiguo.wang@b...
    [mailto:<a href="/group/SunONE-JATO/post?protectID=125056020108194190033029175101192165174048139046">weiguo.wang@b...</a>]
    Sent: Thursday, September 06, 2001 12:25 PM
    Subject: [iPlanet-JATO] sp3 jsp compiler problem
    Matt/Mike/Todd,
    We are trying to migrate to sp3 right now, but have had a lot of
    issues with the new jasper compiler.
    The following workaround has been employed to solve the issues:
    1. Changed the case of the tag attribute to be the same as
    what's
    defined in tld.
    example: changed OnClick to onClick
    2. Removed attributes which are not defined in tld.
    example: escape attribute only defined in three tags
    but in some pages, it's used although it's not defined as an
    attribute
    of certain tags. The jasper compiler doesn't like it.
    3. In an end tag, there can't be any space.
    example: </content > doesn't work. </content> works.
    As I see it, we have two options to go about solving this problem:
    >>
    1. Write a script which will iterate through all the jsp files and
    call jspc on them. Fix the errors manually when jspc fails. Jspc will
    flag the line number where an error occurs.
    2. Write a utility which scans the jsp files and fix the errors when
    they are encountered. We should define what's an error and how to
    correct it. It's best if we combine this with solution 1 since we
    might miss an error condition.
    Actually, there might be another option, which is seeking help from
    you guys since you have better understanding of JATO and iAS. Can you
    do anything to help us?
    We would be happy to hear your thoughts.
    At last, I would like to suggest modifying the moko tool so that
    these rules are enforced and the generated JSPs work with the new
    compiler. This is for the benefit of any new migration projects.
    Thanks a lot.
    Weiguo
    [email protected]
    Choose from 1000s of job listings!
    [email protected]
    Service.
    >
    >
    >
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] TiledView - getting Values

    Kostas--
    This is because in TiledViewBase.mapRequestParameters(), calling
    getChild(String name, int tile) before setting the values in the request,
    will not set the location for the models other that the primary model-
    effectively we are only setting one value (more that once if there aremany
    values being submitted). So we get the value of the last value in thetiled
    view. This is because getChild only changes the location on the primary
    model. Which is why I the following code change worked.Ah, I admit I didn't connect the problem to this. Thanks ver much for
    clarifying.
    As you stated it might be better to add a place holder for all other
    auxillary models and keep them in sync with the primary model.Agreed, this sounds like the correct approach. My unstated assumption was
    that all location changes to the primary model would also occur on the
    auxiliary models, so that would mean that the mapRequestParameters() method
    would then work as intended.
    How about making the primary model the controlling model. We would have to
    "prime" the other models to ensure they all have the same number of rowsas
    the highest model for the request. Otherwise we will the followingsituation
    I detailed in the prevoius email:That works for me, but it will no doubt result in some strange behavior for
    someone down the road. I'll see what's possible about syncing primary and
    auxiliary models more explicitly, or at least checking for the situation
    where the primary has more rows than the other models.
    This way developers would not have to determine if a DisplayField is bound
    to non primary model and do additional processing. I suppose it is aslight
    design question as well. Enforcing a MVC approach is about going to the to
    the Model to get you data. Onthe other hand NetDynamics just allowed youthe
    get the value(s) of a field regardless of the Data Object it was or wasn't
    bound to.Right, and I think it's important for JATO developers to preserve both techn
    iques. The nice thing the technique of accessing the fields directly gives
    you is the ability to obtain data in a non-model-specific way. This can be
    just as valuable as providing model-only interactions.
    Thanks for your feedback Todd. Let me know what you think.Same to you. I hope others on the list have similar suggestions that they
    share with us. I think the above approach is sound and I'll be putting it in
    for the next patch version, 1.1.2. If anyone has any final comments, please
    let me know ASAP.
    Todd

    Hi,
    I wanted to know how the getValues() method works the reason being,
    when the tiled view is NOT bound to a model, it populates all the
    fields with the same name as some thing like
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[0].tbFieldValue
    in which case, the getValues() method works fine.
    But in case where the tiled view is bound to a model, it populates
    with different field names such as,
    PageDetail.rDetail[0].tbFieldValue
    PageDetail.rDetail[1].tbFieldValue
    in this case, the getValues() doesn't work. Any soultion to this?
    We are using Moko 1.1.1.
    thanks in advance,
    raju.
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    Does anyone know of is there a single method to get all values of a
    display
    field in a tiled view without having to iterate through all the
    values ie
    resetTileIndex() / nextTile() approach.
    ie Something that returns an Object[] or Vector just like ND returned a
    CspVector. I tried using the getValues() methods but that allways returns
    a
    single element array containing the first element.
    (I think now, that method is used for multi selecteable ListBoxes)Actually, no. We can add this in the next patch, but for now, I'd recommend
    creating a simple utility method to do the iteration on an arbitrary model
    and build the list for you.
    Todd

  • RE: [iPlanet-JATO] Re: Use Of models in utility classes

    Hi all,
    if you add the following to your spider2jato.xml
    It will automatically map your CSpDataObject.executeImmediate to use
    ExecuteImmediateUtil.executeImmediateSelect with the arguments mapped as
    well.
    Kostas
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[ExecuteImmediateUtil.executeImmediateSelect($1,$2,
    getRequestContext())]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    -----Original Message-----
    From: Matthew Stevens
    Cc: vnamboori@y...
    Sent: 11/29/01 11:23 AM
    Subject: RE: [iPlanet-JATO] Re: Use Of models in utility classes
    Namburi,
    I have included an example in the file ExecuteImmediateUtil.java
    The Yahoo Group will not handle the attached file we will put it in the
    Files section shortly.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
    Sent: Thursday, November 29, 2001 12:29 PM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes
    Matt,
    For CSpSelect.executeImmediate() I have an example of custom helpermethod as a replacement which uses JDBC results instead of
    CSpDBResult.
    Can you send me this example.
    Thanks
    Namburi
    --- In iPlanet-JATO@y..., "Matthew Stevens" <matthew.stevens@E...>
    wrote:
    Namburi,
    I will post a document to the group site this evening which has thedetails
    on various tactics of migrating these type of utilities.Essentially, you
    either need to convert these utilities to Models themselves or keepthe
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of custom helpermethod
    as a replacement whicch uses JDBC results instead of CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes. These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do the
    manipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion for these
    utilities we have to do manually.
    My question is Can we access the the models in the post migration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObject intensive.Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]

    Hi all,
    if you add the following to your spider2jato.xml
    It will automatically map your CSpDataObject.executeImmediate to use
    ExecuteImmediateUtil.executeImmediateSelect with the arguments mapped as
    well.
    Kostas
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpDataObject[.\s]*executeImmediate[\s]*\(([^,]*),([^)]*)\)]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[ExecuteImmediateUtil.executeImmediateSelect($1,$2,
    getRequestContext())]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    -----Original Message-----
    From: Matthew Stevens
    Cc: vnamboori@y...
    Sent: 11/29/01 11:23 AM
    Subject: RE: [iPlanet-JATO] Re: Use Of models in utility classes
    Namburi,
    I have included an example in the file ExecuteImmediateUtil.java
    The Yahoo Group will not handle the attached file we will put it in the
    Files section shortly.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100253094145066046167121181">vnamboori@y...</a>]
    Sent: Thursday, November 29, 2001 12:29 PM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes
    Matt,
    For CSpSelect.executeImmediate() I have an example of custom helpermethod as a replacement which uses JDBC results instead of
    CSpDBResult.
    Can you send me this example.
    Thanks
    Namburi
    --- In iPlanet-JATO@y..., "Matthew Stevens" <matthew.stevens@E...>
    wrote:
    Namburi,
    I will post a document to the group site this evening which has thedetails
    on various tactics of migrating these type of utilities.Essentially, you
    either need to convert these utilities to Models themselves or keepthe
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of custom helpermethod
    as a replacement whicch uses JDBC results instead of CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes. These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do the
    manipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion for these
    utilities we have to do manually.
    My question is Can we access the the models in the post migration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObject intensive.Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]

  • Re: [iPlanet-JATO] JATO 1.2.1

    Raji--
    I sympathize with users trying to understand JATO internals--we do not have
    sufficient (external) documentation for this. However, you do have the full
    source code to view at your convenience. Our hope is that you will be able
    to use the JATO sample application to better understand the range of JATO
    features and how they work, and then be able to drill down to the source
    code if you have implementation questions.
    Have you looked at the JATO sample application? It is bundled with the JATO
    distribution, and allows you to browse the sample source code online.
    Todd
    ----- Original Message -----
    From: "rajeswari pichai" <padmaraji@y...>
    Sent: Wednesday, January 30, 2002 8:05 PM
    Subject: Re: [iPlanet-JATO] JATO 1.2.1
    >
    --- padiyar <padiyar@y...> wrote:
    Hi,
    When is JATO 1.2.1 being released? Right now we are
    using JATO 1.2EA
    Thanks,
    Divakar
    hi all,
    i want help for jato. I couldn't understand the
    framework.is there any Document for that! in site they
    have explained how to use but not what internally
    happens !please help me!
    Thanks in advance
    raji
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    Raji--
    I sympathize with users trying to understand JATO internals--we do not have
    sufficient (external) documentation for this. However, you do have the full
    source code to view at your convenience. Our hope is that you will be able
    to use the JATO sample application to better understand the range of JATO
    features and how they work, and then be able to drill down to the source
    code if you have implementation questions.
    Have you looked at the JATO sample application? It is bundled with the JATO
    distribution, and allows you to browse the sample source code online.
    Todd
    ----- Original Message -----
    From: "rajeswari pichai" <padmaraji@y...>
    Sent: Wednesday, January 30, 2002 8:05 PM
    Subject: Re: [iPlanet-JATO] JATO 1.2.1
    >
    --- padiyar <padiyar@y...> wrote:
    Hi,
    When is JATO 1.2.1 being released? Right now we are
    using JATO 1.2EA
    Thanks,
    Divakar
    hi all,
    i want help for jato. I couldn't understand the
    framework.is there any Document for that! in site they
    have explained how to use but not what internally
    happens !please help me!
    Thanks in advance
    raji
    For more information about JATO, including download information, pleasevisit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

  • Re: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't forget about the regular expression potential

    Namburi,
    When you said you used the Reg Exp tool, did you use it only as
    preconfigured by the iMT migrate application wizard?
    Because the default configuration of the regular expression tool will only
    target the files in your ND project directories. If you wish to target
    classes outside of the normal directory scope, you have to either modify the
    "Source Directory" property OR create another instance of the regular
    expression tool. See the "Tool" menu in the iMT to create additional tool
    instances which can each be configured to target different sets of files
    using different sets of rules.
    Usually, I utilize 3 different sets of rules files on a given migration:
    spider2jato.xml
    these are the generic conversion rules (but includes the optimized rules for
    ViewBean and Model based code, i.e. these rules do not utilize the
    RequestManager since it is not needed for code running inside the ViewBean
    or Model classes)
    I run these rules against all files.
    See the file download section of this forum for periodic updates to these
    rules.
    nonProjectFileRules.xml
    these include rules that add the necessary
    RequestManager.getRequestContext(). etc prefixes to many of the common
    calls.
    I run these rules against user module and any other classes that do not are
    not ModuleServlet, ContainerView, or Model classes.
    appXRules.xml
    these rules include application specific changes that I discover while
    working on the project. A common thing here is changing import statements
    (since the migration tool moves ND project code into different jato
    packaging structure, you sometime need to adjust imports in non-project
    classes that previously imported ND project specific packages)
    So you see, you are not limited to one set of rules at all. Just be careful
    to keep track of your backups (the regexp tool provides several options in
    its Expert Properties related to back up strategies).
    ----- Original Message -----
    From: <vnamboori@y...>
    Sent: Wednesday, August 08, 2001 6:08 AM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
    forget about the regular expression potential
    Thanks Matt, Mike, Todd
    This is a great input for our migration. Though we used the existing
    Regular Expression Mapping tool, we did not change this to meet our
    own needs as mentioned by Mike.
    We would certainly incorporate this to ease our migration.
    Namburi
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    All--
    Great response. By the way, the Regular Expression Tool uses thePerl5 RE
    syntax as implemented by Apache OROMatcher. If you're doing lotsof these
    sorts of migration changes manually, you should definitely buy theO'Reilly
    book "Mastering Regular Expressions" and generate some rules toautomate the
    conversion. Although they are definitely confusing at first,regular
    expressions are fairly easy to understand with some documentation,and are
    superbly effective at tackling this kind of migration task.
    Todd
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@S...>
    Sent: Tuesday, August 07, 2001 5:20 PM
    Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
    forget about the regular expression potential
    Also, (and Matt's document may mention this)
    Please bear in mind that this statement is not totally correct:
    Since the migration tool does not do much of conversion for
    these
    utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
    the translation tool, and the regular expression tool, and severalother
    smaller tools (like the jar and compilation tools). It is correctto state
    that the extraction and translation tools only significantlyconvert the
    primary ND project objects (the pages, the data objects, and theproject
    classes). The extraction and translation tools do minimumtranslation of the
    User Module objects (i.e. they repackage the user module classes inthe new
    jato module packages). It is correct that for all other utilityclasses
    which are not formally part of the ND project, the extraction and
    translation tools do not perform any migration.
    However, the regular expression tool can "migrate" any arbitrary
    file
    (utility classes etc) to the degree that the regular expressionrules
    correlate to the code present in the arbitrary file. So first andforemost,
    if you have alot of spider code in your non-project classes youshould
    consider using the regular expression tool and if warranted adding
    additional rules to reduce the amount of manual adjustments thatneed to be
    made. I can stress this enough. We can even help you write theregular
    expression rules if you simply identify the code pattern you wish to
    convert. Just because there is not already a regular expressionrule to
    match your need does not mean it can't be written. We have notnearly
    exhausted the possibilities.
    For example if you say, we need to convert
    CSpider.getDataObject("X");
    To
    RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
    Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
    updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
    rule:
    <!--getPage to getViewBean-->
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getViewBean($1ViewBean.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    Following this example a getDataObject to getModel would look
    like this:
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getModel($1Model.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    In fact, one migration developer already wrote that rule andsubmitted it
    for inclusion in the basic set. I will post another upgrade to thebasic
    regular expression rule set, look for a "file uploaded" posting.Also,
    please consider contributing any additional generic rules that youhave
    written for inclusion in the basic set.
    Please not, that in some cases (Utility classes in particular)
    the rule
    application may be more effective as TWO sequention rules ratherthan one
    monolithic rule. Again using the example above, it will convert
    CSpider.getDataObject("Foo");
    To
    getModel(FooModel.class);
    Now that is the most effective conversion for that code if that
    code is in
    a page or data object class file. But if that code is in a Utilityclass you
    really want:
    >
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    So to go from
    getModel(FooModel.class);
    To
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    You would apply a second rule AND you would ONLY run this rule
    against
    your utility classes so that you would not otherwise affect yourViewBean
    and Model classes which are completely fine with the simplegetModel call.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getModel\(]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getModel\(]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    A similer rule can be applied to getSession and other CSpider APIcalls.
    For instance here is the rule for converting getSession calls toleverage
    the RequestManager.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getSession().]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    ----- Original Message -----
    From: "Matthew Stevens" <matthew.stevens@e...>
    Sent: Tuesday, August 07, 2001 12:56 PM
    Subject: RE: [iPlanet-JATO] Use Of models in utility classes
    Namburi,
    I will post a document to the group site this evening which has
    the
    details
    on various tactics of migrating these type of utilities.
    Essentially,
    you
    either need to convert these utilities to Models themselves or
    keep the
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of customhelper
    method
    as a replacement whicch uses JDBC results instead of
    CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes.
    These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do themanipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion forthese
    utilities we have to do manually.
    My question is Can we access the the models in the postmigration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObjectintensive. Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

    Namburi,
    When you said you used the Reg Exp tool, did you use it only as
    preconfigured by the iMT migrate application wizard?
    Because the default configuration of the regular expression tool will only
    target the files in your ND project directories. If you wish to target
    classes outside of the normal directory scope, you have to either modify the
    "Source Directory" property OR create another instance of the regular
    expression tool. See the "Tool" menu in the iMT to create additional tool
    instances which can each be configured to target different sets of files
    using different sets of rules.
    Usually, I utilize 3 different sets of rules files on a given migration:
    spider2jato.xml
    these are the generic conversion rules (but includes the optimized rules for
    ViewBean and Model based code, i.e. these rules do not utilize the
    RequestManager since it is not needed for code running inside the ViewBean
    or Model classes)
    I run these rules against all files.
    See the file download section of this forum for periodic updates to these
    rules.
    nonProjectFileRules.xml
    these include rules that add the necessary
    RequestManager.getRequestContext(). etc prefixes to many of the common
    calls.
    I run these rules against user module and any other classes that do not are
    not ModuleServlet, ContainerView, or Model classes.
    appXRules.xml
    these rules include application specific changes that I discover while
    working on the project. A common thing here is changing import statements
    (since the migration tool moves ND project code into different jato
    packaging structure, you sometime need to adjust imports in non-project
    classes that previously imported ND project specific packages)
    So you see, you are not limited to one set of rules at all. Just be careful
    to keep track of your backups (the regexp tool provides several options in
    its Expert Properties related to back up strategies).
    ----- Original Message -----
    From: <vnamboori@y...>
    Sent: Wednesday, August 08, 2001 6:08 AM
    Subject: [iPlanet-JATO] Re: Use Of models in utility classes - Pease don't
    forget about the regular expression potential
    Thanks Matt, Mike, Todd
    This is a great input for our migration. Though we used the existing
    Regular Expression Mapping tool, we did not change this to meet our
    own needs as mentioned by Mike.
    We would certainly incorporate this to ease our migration.
    Namburi
    --- In iPlanet-JATO@y..., "Todd Fast" <toddwork@c...> wrote:
    All--
    Great response. By the way, the Regular Expression Tool uses thePerl5 RE
    syntax as implemented by Apache OROMatcher. If you're doing lotsof these
    sorts of migration changes manually, you should definitely buy theO'Reilly
    book "Mastering Regular Expressions" and generate some rules toautomate the
    conversion. Although they are definitely confusing at first,regular
    expressions are fairly easy to understand with some documentation,and are
    superbly effective at tackling this kind of migration task.
    Todd
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@S...>
    Sent: Tuesday, August 07, 2001 5:20 PM
    Subject: Re: [iPlanet-JATO] Use Of models in utility classes -Pease don't
    forget about the regular expression potential
    Also, (and Matt's document may mention this)
    Please bear in mind that this statement is not totally correct:
    Since the migration tool does not do much of conversion for
    these
    utilities we have to do manually.Remember, the iMT is a SUITE of tools. There is the extractiontool, and
    the translation tool, and the regular expression tool, and severalother
    smaller tools (like the jar and compilation tools). It is correctto state
    that the extraction and translation tools only significantlyconvert the
    primary ND project objects (the pages, the data objects, and theproject
    classes). The extraction and translation tools do minimumtranslation of the
    User Module objects (i.e. they repackage the user module classes inthe new
    jato module packages). It is correct that for all other utilityclasses
    which are not formally part of the ND project, the extraction and
    translation tools do not perform any migration.
    However, the regular expression tool can "migrate" any arbitrary
    file
    (utility classes etc) to the degree that the regular expressionrules
    correlate to the code present in the arbitrary file. So first andforemost,
    if you have alot of spider code in your non-project classes youshould
    consider using the regular expression tool and if warranted adding
    additional rules to reduce the amount of manual adjustments thatneed to be
    made. I can stress this enough. We can even help you write theregular
    expression rules if you simply identify the code pattern you wish to
    convert. Just because there is not already a regular expressionrule to
    match your need does not mean it can't be written. We have notnearly
    exhausted the possibilities.
    For example if you say, we need to convert
    CSpider.getDataObject("X");
    To
    RequestManager.getRequestContext().getModelManager().getModel(XModel.class);
    Maybe we or somebody else in the list can help write that regularexpression if it has not already been written. For instance in thelast
    updated spider2jato.xml file there is already aCSpider.getCommonPage("X")
    rule:
    <!--getPage to getViewBean-->
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getPage[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getViewBean($1ViewBean.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    Following this example a getDataObject to getModel would look
    like this:
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[CSpider[.\s]*getDataObject[\s]*\(\"([^"]*)\"]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[getModel($1Model.class]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    In fact, one migration developer already wrote that rule andsubmitted it
    for inclusion in the basic set. I will post another upgrade to thebasic
    regular expression rule set, look for a "file uploaded" posting.Also,
    please consider contributing any additional generic rules that youhave
    written for inclusion in the basic set.
    Please not, that in some cases (Utility classes in particular)
    the rule
    application may be more effective as TWO sequention rules ratherthan one
    monolithic rule. Again using the example above, it will convert
    CSpider.getDataObject("Foo");
    To
    getModel(FooModel.class);
    Now that is the most effective conversion for that code if that
    code is in
    a page or data object class file. But if that code is in a Utilityclass you
    really want:
    >
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    So to go from
    getModel(FooModel.class);
    To
    RequestManager.getRequestContext().getModelManager().getModel(FooModel.class
    You would apply a second rule AND you would ONLY run this rule
    against
    your utility classes so that you would not otherwise affect yourViewBean
    and Model classes which are completely fine with the simplegetModel call.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getModel\(]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getModel\(]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getRequestContext().getModelManager().getModel(]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    A similer rule can be applied to getSession and other CSpider APIcalls.
    For instance here is the rule for converting getSession calls toleverage
    the RequestManager.
    <mapping-rule>
    <mapping-rule-primarymatch>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-primarymatch>
    <mapping-rule-replacement>
    <mapping-rule-match>
    <![CDATA[getSession\(\)\.]]>
    </mapping-rule-match>
    <mapping-rule-substitute>
    <![CDATA[RequestManager.getSession().]]>
    </mapping-rule-substitute>
    </mapping-rule-replacement>
    </mapping-rule>
    ----- Original Message -----
    From: "Matthew Stevens" <matthew.stevens@e...>
    Sent: Tuesday, August 07, 2001 12:56 PM
    Subject: RE: [iPlanet-JATO] Use Of models in utility classes
    Namburi,
    I will post a document to the group site this evening which has
    the
    details
    on various tactics of migrating these type of utilities.
    Essentially,
    you
    either need to convert these utilities to Models themselves or
    keep the
    utilities as is and simply use the
    RequestManager.getRequestContext.getModelManager().getModel()
    to statically access Models.
    For CSpSelect.executeImmediate() I have an example of customhelper
    method
    as a replacement whicch uses JDBC results instead of
    CSpDBResult.
    matt
    -----Original Message-----
    From: vnamboori@y... [mailto:<a href="/group/SunONE-JATO/post?protectID=081071113213093190112061186248100208071048">vnamboori@y...</a>]
    Sent: Tuesday, August 07, 2001 3:24 PM
    Subject: [iPlanet-JATO] Use Of models in utility classes
    Hi All,
    In the present ND project we have lots of utility classes.
    These
    classes in diffrent directory. Not part of nd pages.
    In these classes we access the dataobjects and do themanipulations.
    So we access dataobjects directly like
    CSpider.getDataObject("do....");
    and then execute it.
    Since the migration tool does not do much of conversion forthese
    utilities we have to do manually.
    My question is Can we access the the models in the postmigration
    sameway or do we need requestContext?
    We have lots of utility classes which are DataObjectintensive. Can
    someone suggest a better way to migrate this kind of code.
    Thanks
    Namburi
    [email protected]
    [email protected]
    [Non-text portions of this message have been removed]
    [email protected]
    [email protected]

  • Re: [iPlanet-JATO] Transaction in JATO

    Jeff--
    I have one thing to add. You can obtain a JDBC Connection in several ways.
    First is to simply use a JNDI lookup on your own, as you would in any J2EE
    application. The second it to use JATO's SQLConnectionManager (available in
    the RequestContext), which provides some additional convenience by
    interposing a level of datasource mapping indirection (see docs). Third,
    you can obtain the connection that any given QueryModel would use by
    default by calling its "getDefaultConnection()" method. This saves you from
    worrying at all about the JDBC datasource name used to obtain the
    connection.
    Any one of these three techniques is perfectly fine; choose the one that
    makes sense for the maintainability of the application in the long run.
    Todd
    Todd Fast
    Senior Engineer
    Sun/Netscape Alliance
    todd.fast@s...
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@s...>
    Sent: Wednesday, October 24, 2001 1:25 PM
    Subject: Re: [iPlanet-JATO] Transaction in JATO
    Jeff,
    See the javadoc for DatasetSQLModelExecutionContext. It may seem a bitcounterintuitive, since for updates and inserts you do not need the full
    dataset capability, but you don't use what you don't need.
    >
    In your case, what you do want to take advantage of is the ability tocontrol the "JDBC Connection" directly. Therein lies the transactional
    control that you are looking for. NetD needed to rely on something like the
    CSpTransaction class precisely because it did not allow developers direct
    access to the JDBC Connection. That is no longer a restriction in JATO,
    hence, there is no equivalent to CSpTransaction per se.
    >
    >
    public class DatasetSQLModelExecutionContext
    extends DatasetModelExecutionContextImpl
    implements SQLModelExecutionContext
    An execution context used to execute dataset operations on QueryModels(normally SQL SELECT operations). Developers can specify both the dataset
    offset and size, as well as a JDBC connection or statement object, to be
    used during execution of the model.
    >
    By providing a connection or statement object to the model via thiscontext, developers can maintain control of the transaction state of the
    connection instead of relying on the default behavior (which is generally
    equivalent to auto-commit semantics). However, such use also introduces a
    measure of responsibilty on the developer--because providing these objects
    to the model manually causes the model to avoid any connection lifecycle
    management of its own, the developer is completely responsible for managing
    the lifecycle of the connection, as well as the lifecycle of any
    transactions that might be pending on that connection.
    >
    In general, if the developer supplies a connection object, he or she neednot also supply a statement object. Conversely, if the developer supplies a
    statement object, he or she need not specify a connection object (though he
    will need to keep a reference to the connection object used to create the
    statement in order to close it after execution is complete). In both cases,
    the developer is ultimately responsible for releasing the connection
    manually when use of it is complete.
    >
    ----- Original Message -----
    From: jeffrey_smith@p...
    Sent: Wednesday, October 24, 2001 12:52 PM
    Subject: [iPlanet-JATO] Transaction in JATO
    Does anyone have an example on how to do multiple updates/inserts using
    various models in one transaction in JATO1.2. I am trying to migrate ND
    code that uses a CSpTransaction object to do this and there does notappear
    to be an equivalent object in JATO.
    Thanks.
    Jeff Smith
    Senior Application Consultant
    Software Engineering
    Putnam Investments
    voice: (617)760-3121
    fax: (617)760-3850
    Choose from 1000s of job listings!
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

    Jeff--
    I have one thing to add. You can obtain a JDBC Connection in several ways.
    First is to simply use a JNDI lookup on your own, as you would in any J2EE
    application. The second it to use JATO's SQLConnectionManager (available in
    the RequestContext), which provides some additional convenience by
    interposing a level of datasource mapping indirection (see docs). Third,
    you can obtain the connection that any given QueryModel would use by
    default by calling its "getDefaultConnection()" method. This saves you from
    worrying at all about the JDBC datasource name used to obtain the
    connection.
    Any one of these three techniques is perfectly fine; choose the one that
    makes sense for the maintainability of the application in the long run.
    Todd
    Todd Fast
    Senior Engineer
    Sun/Netscape Alliance
    todd.fast@s...
    ----- Original Message -----
    From: "Mike Frisino" <Michael.Frisino@s...>
    Sent: Wednesday, October 24, 2001 1:25 PM
    Subject: Re: [iPlanet-JATO] Transaction in JATO
    Jeff,
    See the javadoc for DatasetSQLModelExecutionContext. It may seem a bitcounterintuitive, since for updates and inserts you do not need the full
    dataset capability, but you don't use what you don't need.
    >
    In your case, what you do want to take advantage of is the ability tocontrol the "JDBC Connection" directly. Therein lies the transactional
    control that you are looking for. NetD needed to rely on something like the
    CSpTransaction class precisely because it did not allow developers direct
    access to the JDBC Connection. That is no longer a restriction in JATO,
    hence, there is no equivalent to CSpTransaction per se.
    >
    >
    public class DatasetSQLModelExecutionContext
    extends DatasetModelExecutionContextImpl
    implements SQLModelExecutionContext
    An execution context used to execute dataset operations on QueryModels(normally SQL SELECT operations). Developers can specify both the dataset
    offset and size, as well as a JDBC connection or statement object, to be
    used during execution of the model.
    >
    By providing a connection or statement object to the model via thiscontext, developers can maintain control of the transaction state of the
    connection instead of relying on the default behavior (which is generally
    equivalent to auto-commit semantics). However, such use also introduces a
    measure of responsibilty on the developer--because providing these objects
    to the model manually causes the model to avoid any connection lifecycle
    management of its own, the developer is completely responsible for managing
    the lifecycle of the connection, as well as the lifecycle of any
    transactions that might be pending on that connection.
    >
    In general, if the developer supplies a connection object, he or she neednot also supply a statement object. Conversely, if the developer supplies a
    statement object, he or she need not specify a connection object (though he
    will need to keep a reference to the connection object used to create the
    statement in order to close it after execution is complete). In both cases,
    the developer is ultimately responsible for releasing the connection
    manually when use of it is complete.
    >
    ----- Original Message -----
    From: jeffrey_smith@p...
    Sent: Wednesday, October 24, 2001 12:52 PM
    Subject: [iPlanet-JATO] Transaction in JATO
    Does anyone have an example on how to do multiple updates/inserts using
    various models in one transaction in JATO1.2. I am trying to migrate ND
    code that uses a CSpTransaction object to do this and there does notappear
    to be an equivalent object in JATO.
    Thanks.
    Jeff Smith
    Senior Application Consultant
    Software Engineering
    Putnam Investments
    voice: (617)760-3121
    fax: (617)760-3850
    Choose from 1000s of job listings!
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp
    [Non-text portions of this message have been removed]
    For more information about JATO, please visit:
    http://developer.iplanet.com/tech/appserver/framework/index.jsp

Maybe you are looking for

  • How to set up shared use of "Contacts" data w/ 2 individual user accounts?

    How to set up shared use of application "Contacts" data for two individual user accounts?

  • Standard Objects in BW

    Hi All For the following fields available in MARC table of R/3 do we have standard objects available in BW. Plz help. SOBSL - Special Procurement Type BSTRF - Rounding Value for Purchase Order Quantity BSTFE - Fixed Lot Size BSTMI - Minimum Lot Size

  • Calling Webdynpro application from Workflow Task

    Hi All, How do i call a custom Java WebDynPro Application from my task? How to pass the container values to the Webdynpro application. Can some one help me out? Thanks, Sarath

  • Time Capsule "not getting IP Address"

    I am a comcast internet customer and I have the RCA cable modem. My network has been up and running fine on a Linksys54g for a year or two. I disconnected it today, and I plugged in my time capsule (exactly following the instructions. My powerbook pr

  • Allocation of moulds cost to units produced....

    Hi All, I have an issue... need ur expert opinion on it.... Client is using the die for producing the material...one die is used for sometime...may be it produces 100 or 200 or 500 units...we dont know the exact quantity. Problem is that client want