Results 1 to 8 of 8
  1. #1
    sdmente is offline Member
    Join Date
    Jul 2010
    Posts
    1
    Rep Power
    0

    Default Question about architecture

    Hello
    I have a question.
    I have been working in a Content Management with Java at my job.
    The Java architect proposed the following architecture as solution.

    ----WEB LAYER----
    JSP
    Struts
    ----Business Layer----------
    Manager Classes
    Hibernate
    ----Data Layer----
    DB

    The web server is Tomcat V6 and MySQL is the database

    I have a dude about this architecture. In order to don't use persistence objects in the WEB layer(because it cause Permgen memory problems), the Manager Classes will have methods to transform persistence objects to DTO objects(these objects will be used in the web layer), with the use of getters and setters. I think that these changes wouldn't solve the memory problems.
    What is your opinion about this architecture? Do you have any idea to improve it?

    Thanks for all.

    Nickolas

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    you can control the amount of perm gen memory tomcat Java virtual machine uses, in the CATALINA_OPTS environment variable, specify the "-XX:MaxPermSize" variable, for example,
    Java Code:
    -XX:MaxPermSize=128m
    Allowing the VM to use more permgen memory should help fix the getting of permgen problems.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    Cross-posted in many fora.

    To the original poster, welcome to the forum, and I hope your question gets answered, but I do request that if you cross-post a question you provide links to the other cross-posts. Nobody likes duplicating work that's already been done.

    The problem is that you're asking unpaid volunteers to help you here, not paid consultants, and most of us mind if we take time away from work/lives/play to try to help someone only to find that we've provided a solution that was already provided in a cross-post hours ago. The proper thing to do is that if you feel you must cross-post, at least provide links in each cross-post to the other, so that folks don't waste time answering something already answered and so that folks can review all discussions that have already occurred.

    Thanks for your cooperation.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    @OP, cross-posting always discourage people to answer in your thread, specially me.

    Anyway my suggestion is different than what you thought.

    For the business logic layer I propose Spring, EJB. And if you want to use Hibernate them handle it via JPA. Spring is head of that in my experience.

    For the application server, use JBOSS which is more advanced in memory management and concurrency handling.

  5. #5
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    12,185
    Rep Power
    20

    Default

    Quote Originally Posted by sdmente View Post
    ...

    In order to don't use persistence objects in the WEB layer(because it cause Permgen memory problems), the Manager Classes will have methods to transform persistence objects to DTO objects(these objects will be used in the web layer), with the use of getters and setters. I think that these changes wouldn't solve the memory problems.
    What is your opinion about this architecture? Do you have any idea to improve it?

    Thanks for all.

    Nickolas
    OK, um. Why would avoiding it in the web layer prevent permgen problems? You either need the Hibernate classes or you don't, and this technique would result in more classes (ie more Permgen than the straight Hibernate option). So I don't get the problem, and I don't get how this "solves" it.

    I suspect there's more going on in your architecture than this brief summary suggests, if this is truly a fix.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

Similar Threads

  1. Architecture of Web Application
    By javaforumsuser in forum Web Frameworks
    Replies: 1
    Last Post: 03-02-2009, 10:36 AM
  2. Java Architecture Question
    By ronakppatel in forum Web Frameworks
    Replies: 1
    Last Post: 10-01-2008, 01:13 PM
  3. Architecture Rules 2.1.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 07-11-2008, 03:39 PM
  4. Architecture Rules 2.0-rc2
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 11-14-2007, 07:27 PM
  5. Architecture of Any IDE...
    By vikki_pu in forum Other IDEs
    Replies: 5
    Last Post: 10-30-2007, 02:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •