• 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
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Guidance Please

 
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was wondering if anyone could help me narrow down the list of application frameworks which could support what I need. I am to write a small web application which only needs to support a maximum of 12 concurrent users. The sticking point is that I would like to re-use and some exising logic held in a .jar file which has the following restrictions :-

1. Not thread safe.

2. Contains public static variables which contain values which remain the same for any specific user session, but not necessarily the same for different users, hence I cannot use an enviroment which has static variables shared across different user sessions. I guess this discounts EJB's

I think 2. is perhaps the most difficult problem as I suspect it would mean each server side user session would need to run in it's own JVM or have I got it wrong.

I've deliberatly not provided too much coding detail to avoid clouding the problem. At this stage I'm just hoping to narrow down the field of candidates.

Thanks in advance

Dave
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the most popular frameworks for creating web applications right now would probably be struts(1 or 2) or Spring MVC for the front end. Hibernate for the persistence layer, and spring to wire everything together. There are a TON of options out there, it's really picking the right one for the job, if it's 12 users or 1200, you should still build a solid application. it really depends on the type of app you're building too. With the info you gave there's not much to go on, but I've used those for both large and small projects and they've been fine.
As far as pulling out code into a jar what's the point of that in this case? Are you making more than one application? Or are you planning to reuse it in multiple different applications? Just because you have concurrent users does not mean you need 12 applications running. You'll just have to have your application manage the details of the users, otherwise your application server will handle most of that. Most every website has concurrent users, they each have their own session, from their own browser. It's not like after I login to this application you can hit profile and it's mine and not yours, although you could program it to be like that if you wanted to.
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply. My application will consist of a normal J2SE Swing client app and a Web Servlet app. The Swing client is complete and I would like to reuse the business logic within the Servlet to ensure that they work the same and minimise code maintenance. What has really done my head in and stopped me from progressing for months now is how to accomodate the shared threaded nature of a servlet without a total revamp of the code. The application permits the user to select a database at start up. Not only can each user select a different target database, but also each database can be mysql, oracle, mssql or db2. The schema's are compatible but the specific sql statements are read into an array once the user has selected the required target database. This means that although each servlet services more than one user, each user may have a different connection and be using different sql statements according to the vendors peculiar syntax. All of this is working on the swing client app ok and I have done it by loading the connection and sql statements into a public staic object which all business objects can reference. Given that each swing client runs in it's own jvm this does present a problem, but the same connot be said of for a servlet. I have considered passing my object containing the connection and sql to each of my business objects as a paramter (constructor) rather than using a static variable, but there is a fairly large overhead establishing a connection and reading in all the db vendor specific stuff for every transaction.
 
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic