-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: using hibernate with applets
PostPosted: Mon Jul 05, 2004 8:01 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 3:22 pm
Posts: 26
Hi,
i'm developing an applet based application and i would like to use hibernate..

which would be the best architecture for such application?
i suppose including hibernate in the applet is not the best way since
each user will have their own hibernate cache, etc.

i'll appreciate any help,
Gerardo


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 05, 2004 11:20 pm 
Regular
Regular

Joined: Tue Sep 30, 2003 11:27 am
Posts: 60
Location: Columbus, OH, USA
How about the applets sending and receiving their information through a centralized web service, which is in turn connected to your persistent store(s) using Hibernate?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 11:35 am 
Beginner
Beginner

Joined: Fri Jan 16, 2004 3:22 pm
Posts: 26
this seems to me a better approach since i'm also concerned with the security issues of applets accesing directly the database.
So, any way to offer an interface between applet and database would be more appropriate.

however, since i don't know much about web services i wonder if the overhead of the web service is small enough...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 11:53 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
The 2nd level cache will not be shared, but the first level cache (ie the session) can be kept opened and thus benefit a good user oriented cache.
Check the wiki on session strategies and the forum too.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 11:57 am 
Regular
Regular

Joined: Tue Sep 30, 2003 11:27 am
Posts: 60
Location: Columbus, OH, USA
If you were only developing the server-side stuff for the puposes of intercepting Applet requests, you might want to use something simpler or familiar since SOAP (and its development) has a bit of overhead to it. Some IDEs like WSAD 5.1 really help in this regard, but if you're hacking Axis code, etc. directly, be prepared for some blood and sweat.

However, SOAP web services offer the advantage of being mostly platform independant and are very strategic for future application-to-application connectors (i.e. nearly all enterprise application integrators can now talk SOAP, and you can find SOAP APIs in Perl, .NET and most other current languages). Who knows, maybe your data/service will become so popular that others will want to consume it? If you're using SOAP, you're in a better position to offer it up to them.

In any case, you'd be going in the right direction by creating a server-side broker to handle applet requests. Direct client-to-DB access is evil, not only for security, but also for loading, caching, location of business rules, size of the client, etc. Good luck!

Scott


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 4:30 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 3:22 pm
Posts: 26
thanks your comments have been very enlightening, and think i'll use some server side 'thing'...

the application is not meant to run beyond the boundaries of a LAN, given that, how appropriate would be to publish the hibernate's sessionfactory
in some JNDI context to share it?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 06, 2004 5:22 pm 
Regular
Regular

Joined: Tue Sep 30, 2003 11:27 am
Posts: 60
Location: Columbus, OH, USA
You're welcome!

A JNDI-published sessionfactory is an interesting idea and workable if you keep the session lifespans short.

This does, however, mean that your applets will have to include the Hibernate API and that your business & DAO logic will also have to reside in the client tier. This'll make the applets big and possibly slow to download, but I can see how it could simplify some development, especially if you're more experienced with rich client development.

Scott


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 07, 2004 7:04 pm 
Beginner
Beginner

Joined: Fri Jan 16, 2004 3:22 pm
Posts: 26
in fact that's the case, and i think i'll go with that option...

i really appreciate all your comments and salute you! :)

Gerardo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.