• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

isNew() method

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a servlet program in which i am checking whether the session created is new or not. But the isNew() method always returns false even if i redeploy my application.
I am using BEA weblogic 8.1 server
Can anyone please tell me the reason.
Thanks in advance.

I have attached my code with this..



[EDIT - code tags added]
[ February 06, 2006: Message edited by: David O'Meara ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You may find that the comtainer if creating the session before your code gets run, but you can still manage this. Just modify your code to see if the session has been initialised yet and add your code there instead:



Note that attaching a connection to a session is a bad idea, as a database connection is a heavy object, and it is better to limit the number created. They are also utilised fairly sparingly, so getting them from a ConnectionPool is much more efficient.

Dave
 
Those who dance are thought mad by those who hear not the music. This tiny ad plays the bagpipes:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic