need some tips before to code my first double session scope app


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: need some tips before to code my first double session scope app

  1. #1
    tyris Guest

    need some tips before to code my first double session scope app


    hi all,

    i'd like some tips before to code the server part of a WebService (i use
    apache/tomcat, SOAP 2.2, and java for the code)

    i want to create a webservice where : the server part creates a session to
    2 databases (so one session per DB) and keep them alive (so i think i should
    use session scope in my DeploymentDescriptor but that's the only thing i
    know about it).

    then the client part of the web service, thanks to parameters, will have
    the choice between DB1 and DB2 (so session1 and session2)


    First of all, is it doable ?

    then could you tell me the main things i should know to create and keep alive
    those 2 sessions ? (because i only made for the moment a simple webservice
    with a client's request, and anwser and then everything is closed), so a
    brief summary of persistant session or a link to any doc would be appreciated

    regards,
    Elise who whe hates WebServices


  2. #2
    MarkN Guest

    Re: need some tips before to code my first double session scope app


    You really should pool database connections using a connection manager/pooler.
    Keeping connections alive in sessions doesn't scale well.

    Mark

    "tyris" <kea@mailcity.com> wrote:
    >
    >hi all,
    >
    >i'd like some tips before to code the server part of a WebService (i use
    >apache/tomcat, SOAP 2.2, and java for the code)
    >
    >i want to create a webservice where : the server part creates a session

    to
    >2 databases (so one session per DB) and keep them alive (so i think i should
    >use session scope in my DeploymentDescriptor but that's the only thing i
    >know about it).
    >
    >then the client part of the web service, thanks to parameters, will have
    >the choice between DB1 and DB2 (so session1 and session2)
    >
    >
    >First of all, is it doable ?
    >
    >then could you tell me the main things i should know to create and keep

    alive
    >those 2 sessions ? (because i only made for the moment a simple webservice
    >with a client's request, and anwser and then everything is closed), so a
    >brief summary of persistant session or a link to any doc would be appreciated
    >
    >regards,
    >Elise who whe hates WebServices
    >



  3. #3
    UP Guest

    Re: need some tips before to code my first double session scope app


    Or use data sources instead if your driver provides

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center