HttpSession

S

Steven J. Sobol

I am working on a little project that I want to be able to run either
as a Swing app or a web app. I need to use something for session
management either online or offline and was wondering if there are any
negative ramifications to using an object that implements HttpSession
if I'm not using it within a J2EE web container. I'd like to be able
to use HttpSession because that way I can write code once that will
work either in a web app or in a desktop app.

If this is a stupid idea, let me know. :)
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Steven said:
I am working on a little project that I want to be able to run either
as a Swing app or a web app. I need to use something for session
management either online or offline and was wondering if there are any
negative ramifications to using an object that implements HttpSession
if I'm not using it within a J2EE web container. I'd like to be able
to use HttpSession because that way I can write code once that will
work either in a web app or in a desktop app.

If this is a stupid idea, let me know. :)

The side effects of implementing an interface should be minimal.

But I do not like the idea. Every maintenance programmer that
will be reading your code will ask: WTF is going on here ?

Arne
 
D

Daniel Pitts

I am working on a little project that I want to be able to run either
as a Swing app or a web app. I need to use something for session
management either online or offline and was wondering if there are any
negative ramifications to using an object that implements HttpSession
if I'm not using it within a J2EE web container. I'd like to be able
to use HttpSession because that way I can write code once that will
work either in a web app or in a desktop app.

If this is a stupid idea, let me know. :)

--
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.

I would look into "Spring Web Flow". its part of the Spring
Framework. Don't be fooled by the "Web" in the title, its designed to
work well with many types of MVC frameworks, including Swing.
 
S

Steven J. Sobol

The side effects of implementing an interface should be minimal.

But I do not like the idea. Every maintenance programmer that
will be reading your code will ask: WTF is going on here ?

Now I'm thinking it'll probably be simpler to create an object to hold all
of the information I need for a specific session, and then store that
object in an HttpSession if my code is running on the web...
 
D

Daniel Pitts

Now I'm thinking it'll probably be simpler to create an object to hold all
of the information I need for a specific session, and then store that
object in an HttpSession if my code is running on the web...

Sounds like the way to go.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top