J2SE framework


Performance and scalability: J2SE framework

  1. J2SE framework (2 messages)

    Dear J2SE expert,

    I have a several questions on how to develop a good and sustainable J2SE application. As I need to develop a high performance application, which can support multiple thread, garbage collection, messaging and database pooling. I was wondering to know is there any open-source framework which can support the above criteria. Overall speaking it seems to build an application server to support one application only. In addition, are there any other factors for building a J2SE application that I need to concern?

    In J2EE point of view EJB and MVC model will be an option and choose any one of the Application Server like JBoss, Bea, Websphere and so on.

    I would appreciate any help you can provide!

    Thanks and regards,

    Threaded Messages (2)

  2. Re: J2SE framework[ Go to top ]

    There are some frameworks which work for J2SE as well. The important question is why are you using a J2SE environment instead of a J2EE one. With these reasons in mind, you can select which frameworks/libraries to use. If you have a need for overall simplicity consider Essence Java Framework which is an open source framework which supports component construction via IoC, a high performance thread model, event/messaging and a high level database layer. http://sourceforge.net/projects/essence The last feature will be in the 0.7 release due in December.
  3. shine frame work is your need[ Go to top ]

    hi. i `m alen smith a java architect. if you want learning J2ee you must choose a powerful framework first.such as shine or struts. but to my idea you learn and use shine frame work,because of this frame work is wery powerfull and also using shine is so easy because shine frame work`s team write sevral document and sample about that. you can go to www.J2sos.org and find sevral document about learning shine. and you can find download link for download shine frame work. if you have a problem in any part of learning shine,you can get help fromshine framework`s support team. you can ask your question and they answer to your questions. I give you a hello world sample that I copyed from www.j2sos.org in technical forum. you can find complet learning document in this site. ""this sample copyed from www.J2SOS.org "" Hi! I'm Mehdi Mousavi, member of Shine Framework's support team. Today I'll teach you developing Hello world sample. I want teach & show you this powerful technology. We use (jdeveloper10g) IDE for develop this project by shine framework. In start , make new application with name "learning-shine" like this step : 1- Right click on application 2- choice new application workspace 3- complete this step follow up picture 2 As you see , new application have 2 part (model and view). Now in continue, we should add Shine library to our project as below: For do this , do this step: Double-click on view ? library ? add shine, jsp runtime & servlet runtime If the shine library isn't in your list, add it as below: Click on New button in the bottom of the page ? Edit ? Add Entry ? find Shine.jar & click on Select ? ok As you see Shine library has added to your library list. Create request page in next step we should create a JSP request page : Right-click on view ? New ? jsp page ? ok ? name your page as "Request.jsp" ? ok As you see, your page has created. now , we must design this page . For do this , in source tab write this code: <%@ page contentType="text/html;charset=windows-1252"%> untitled



    We design one HTML form with two text field for give Fname (First name) & Lname (Last Name) . also if you want, you can design your page without write . component pallet will help you to Create your HTML form Create response page : Now we need create one response page (a service) . Right-click on view ? New ? jsp page ? ok ? name your page as "ResponseServer.jsp" ? ok As you see, your page has created. Now we write this code in that page like beneath code: <%@ taglib uri="/WEB-INF/shine.tld" prefix="shine"%> <% String x=(String) request.getParameter("Fname"); String y=(String) request.getParameter("Lname"); out.print("welcome Mr/Mrs "+x+" "+y); %>

    <%out.print("Hello.I am "+x+" "+y); %>

    <%out.print("Email Address:"+" ");%> <%out.print(" www.j2sos.org.com");%> As you see in the source we have a taglib named "shine.tld" that is at "shine-framework/lib/tld". You should copy it at this address: ../jdev/mywork/shine/view/public_html/web-inf/ After this tag, we have "Header" & "Footer" in our source. Use Header & Footer to write the codes & massages you want to be shown on the top & bottom of all pages. Like welcome massage you see on the top of the pages while mail checking. As you see, we put welcome massage & the codes of getting two variables of the form and store them in two public variables, in header & the mail address in footer in this sample. You can use all of the programming codes in header & footer. ** Interesting tip for the developers who had worked with other frameworks like Struts: If you want, you can use all struts codes throw the tags. (Although after working with Shine, you'll understand that Shine is more strong that you won’t need to do like that.) In the source continuation we have "tag" & "shine:tag" that are related to the Shine's own architecture, JWMS. In Shine, instead of having a lot of response pages we can have one or more services that include our response pages as some tags. e.g. / The Bank is the service & its operations are the tags. Indeed in this ways, shine create all response pages in one response page (package). In this sample, we have a tag named "tag1" that shows this output massage: "Hello . I am fname (First name) lname (Last name)" *developer saved with tags of shine in create more and work with many response pages.* Now let's create the Mapping class: MappingClass is the engine of the Shine framework. To create it do the instructions as below: Right-click on view ? New ? java class? ok ? name your class as "ShineMappingClass" ? ok Now you have a class named "ShineMappingClass". Ok, write these codes in it now: package view; import com.evermind.client.clientassembler.ClientAssembler; import j2sos.shine.controller.Mapping; import j2sos.shine.script.Server; public class ShineMappingClass extends Mapping { public void rater() { String b=(String) getRequest().getParameter("Fname"); String c=(String) getRequest().getParameter("Lname"); System.out.print("Hello"+b+c+"How are you?"); forward("ResponseService","tag1"); } } As you see all of the executive functions implements in "rater ()" method. In this sample first we get Fname & Lname of the input then cast them to String mode and store them in "b" & "c" variables. The "System.out.print("Hello "+b+" "+c+". How are you?!")" code makes just a test output that is visible only in IDE. "forward("ResponseService","tag1")" code says go to "ResponseService" & run "tag1". Now we just need to set the properties of "web.xml" file. Open "web.xml" file & write this source in it: <!--?xml version = '1.0' encoding = 'windows-1252'?--> Empty web.xml file for Web Application ShineMappingClass view.ShineMappingClass ResponseService ContentType text/html; charset=utf-8 ServerConsoleStatus false ShineMappingClass ShineMappingClass.exec 35 html text/html txt text/plain As you see, we set colored parts as below: Blue part: say the name & the address of "ShineMappingClass". Red part: set the name of "ResponseService.jsp" as ResponseService. (Indeed it is the same name that had used in "forward" in "ShineMappingClass".) * An applicable tip: If we had more services, we should do this definition for each one, separately. Brown part: introduce ShineMappingClass as executive class. Congratulations! Now us project is ready , and you must run it. For do this , you must run request.jsp page . After run , one page be open with two text field like this picture: Now if you insert fname (First name) and lname (Last name) , after push submit you see this Response: Congratulate Now, You can deploy one simple project by shine I hope you would enjoy yourself! you can find complete samples about shine framework in: www.j2sos.org or http://groups.google.com/group/j2sos and for downloading shine framework you must visit this link in sourceforge.net: http://sourceforge.net/projects/shine-app/ Good luck.