Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2007

Tip: Looking for answers? Try searching our database.

HttpSession

Thread view: 
Steven J. Sobol - 26 Mar 2007 02:20 GMT
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. :)

Signature

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.

Arne Vajhøj - 26 Mar 2007 02:45 GMT
> 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
[quoted text clipped - 5 lines]
>
> 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
Steven J. Sobol - 26 Mar 2007 20:08 GMT
>> 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 ?

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...

Signature

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.

Daniel Pitts - 26 Mar 2007 21:24 GMT
> In article <460725b6$0$90276$14726...@news.sunsite.dk>, Arne Vajhøj wrote:
> >> If this is a stupid idea, let me know. :)
[quoted text clipped - 7 lines]
> 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.
Daniel Pitts - 26 Mar 2007 03:21 GMT
> 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
[quoted text clipped - 11 lines]
>
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.