You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2004/11/24 02:58:18 UTC

[jira] Created: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Every request triggers the init() function on server side. Should call only once for initing
--------------------------------------------------------------------------------------------

         Key: AXISCPP-282
         URL: http://nagoya.apache.org/jira/browse/AXISCPP-282
     Project: Axis-C++
        Type: Bug
  Components: Basic Architecture  
    Versions: 1.4 Alpha    
 Environment: All platforms
    Reporter: Samisa Abeysinghe


It appeared to me that every request triggers the init() function.  For 
the
short-term, I moved the code from init() to the constructor.  I expect
someone will have a proper fix soon.

-Duke


-----Original Message-----
From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
Sent: Tuesday, November 23, 2004 3:50 PM
To: axis-c-user@ws.apache.org
Subject: connection to database


Hi.

I am trying to publish a web service to access a database: a client
calls the ws, the ws makes a query to the database and returns the
retrieved data as a string.

Modifying the skeleton generated by axis, i've written in the init
method of MyClassPortType.cpp the code to open a connection to the
database. I thought it would be the only connection of the ws, shared 
by all
the client's requests. But i noticed the service is quite slow: i
suppose that the init method is executed for EVERY client's request.
Am I wrong?

If the init method is executed every time, for every call to the ws,
what's for? In this way, if i understood, the web service is
completely stateless...or have i completly misunderstood everything??
..you know, it's really likely! :)

thanks a lot!

Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-282?page=history ]

Samisa Abeysinghe updated AXISCPP-282:
--------------------------------------

    Component: Server - Engine
                   (was: Basic Architecture)

> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe

>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-282?page=all ]

Samisa Abeysinghe updated AXISCPP-282:
--------------------------------------

    Attachment: serverHandler.JPG

The class structure for the Web Service Handler. 
We can move the init/fini to Wrapper Class Handler and hide them from the server wrapper and skeleton.
The inits and exit actions could be done using the service constructor and destructor.

init and fini has been inherited from the Handler interface, but a web service is not really a handler

> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Samisa Abeysinghe
>  Attachments: serverHandler.JPG
>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Chinthana Danapala (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-282?page=all ]

Chinthana Danapala reassigned AXISCPP-282:
------------------------------------------

    Assign To: Chinthana Danapala

> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Chinthana Danapala

>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXISCPP-282?page=comments#action_12319565 ] 

Samisa Abeysinghe commented on AXISCPP-282:
-------------------------------------------

Yes init is called for every method invocation right now.

If we want one off activities, whay cant we use the constructor? Would it be a bad idea to have the database connection opening in the constructor?

> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Chinthana Danapala

>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-282?page=all ]

Samisa Abeysinghe reassigned AXISCPP-282:
-----------------------------------------

    Assign To: Samisa Abeysinghe  (was: Chinthana Danapala)

> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Samisa Abeysinghe

>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXISCPP-282) Every request triggers the init() function on server side. Should call only once for initing

Posted by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXISCPP-282?page=all ]
     
Samisa Abeysinghe closed AXISCPP-282:
-------------------------------------

    Fix Version: 1.6 Alpha
     Resolution: Fixed

Removed init and fini from server Skeleton and wrapper. The rationale was that the init and fini purpose could be achieved with constructor and destructor. 



> Every request triggers the init() function on server side. Should call only once for initing
> --------------------------------------------------------------------------------------------
>
>          Key: AXISCPP-282
>          URL: http://issues.apache.org/jira/browse/AXISCPP-282
>      Project: Axis-C++
>         Type: Bug
>   Components: Server - Engine
>     Versions: 1.4 Alpha
>  Environment: All platforms
>     Reporter: Samisa Abeysinghe
>     Assignee: Samisa Abeysinghe
>      Fix For: 1.6 Alpha
>  Attachments: serverHandler.JPG
>
> It appeared to me that every request triggers the init() function.  For 
> the
> short-term, I moved the code from init() to the constructor.  I expect
> someone will have a proper fix soon.
> -Duke
> -----Original Message-----
> From: Mauro Tosca [mailto:mauro.tosca@gmail.com]
> Sent: Tuesday, November 23, 2004 3:50 PM
> To: axis-c-user@ws.apache.org
> Subject: connection to database
> Hi.
> I am trying to publish a web service to access a database: a client
> calls the ws, the ws makes a query to the database and returns the
> retrieved data as a string.
> Modifying the skeleton generated by axis, i've written in the init
> method of MyClassPortType.cpp the code to open a connection to the
> database. I thought it would be the only connection of the ws, shared 
> by all
> the client's requests. But i noticed the service is quite slow: i
> suppose that the init method is executed for EVERY client's request.
> Am I wrong?
> If the init method is executed every time, for every call to the ws,
> what's for? In this way, if i understood, the web service is
> completely stateless...or have i completly misunderstood everything??
> ..you know, it's really likely! :)
> thanks a lot!
> Mauro

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira