New to J2EE; Best Practices

Hi everyone, and thanks in advance for all of your help.
I'm somewhat new to J2EE, at least in the sense of creating my own application. I work for a small software company in New England, and have to work on an enterprise application as part of my job; unfortunately, I don't get much exposure to the total of J2EE. Instead, most of my work is on small extensions, database scripts, or external projects that don't quite give me the exposure I'm looking for.
As an exercise, I've decided to put together a sample J2EE application. I've spent time reading the (many) J2EE tutorials out there, but I'm having trouble putting it all together. This application works, but I know that I've used some bad patterns, and was hoping to get some feedback. My application consists of 4 Java classes and 8 JSPs, but none over 100 lines, and only 1 above 50.
One final note before I start: yes, I know there are some frameworks out there that would help; I plan on migrating to Struts at some point. However, I wanted to make sure I understand the core J2EE structure before I delved into that.
My application simply allows a user to add, edit, or delete entries in a database. The database consists of 1 table (Projects), with two fields: an id, and a name.
The first page, Projects.jsp, lists the current projects in the database for the user:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<jsp:useBean id="projectsDAO"
             class="com.emptoris.dataAccess.ProjectsDataAccessObject"
             scope="application" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Projects</title>
  </head>
  <body>
    <form name="projectsForm"
          action="<%= response.encodeURL("ProjectsController.jsp") %>"
          method="post">
      <c:if test="${projectsDAO.projects.numberOfProjects > 0}">
        <table>
          <tr>
            <th>Select</th>
            <th>ID</th>
            <th>Name</th>
          </tr>
          <c:forEach items="${projectsDAO.projects.projects}" var="project"
                     step="1">
            <tr>
              <td>
                <input type="radio" name="projectId" value="${project.id}" />
              </td>
              <td><c:out value="${project.id}" /></td>
              <td><c:out value="${project.name}" /></td>
            </tr>
          </c:forEach>
        </table>
        <input type="submit" name="action" value="Edit Project" />
        <input type="submit" name="action" value="Delete Project" />
      </c:if>
      <input type="submit" name="action" value="Add New Project" />
    </form>
  </body>
</html>The ProjectsDataAccessObject is a class that simply mirrors the table in the database. Adding, editing, or removing entries in this class will modify the database accordingly:
package com.emptoris.dataAccess;
import java.sql.*;
import com.emptoris.model.*;
public class ProjectsDataAccessObject {
    private Connection connection;
    private Statement statement;
    private Projects projects;
    public ProjectsDataAccessObject() throws ClassNotFoundException,
        SQLException {
        Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
        connection =
            DriverManager.getConnection(
                "jdbc:microsoft:sqlserver://AFRASSO:1433", "sa", "password"
        statement = connection.createStatement();
        statement.execute("USE test");
    public Project getProject(int id) throws SQLException {
        Projects projects = getProjects();
        Project project = projects.getProject(id);
        return project;
    public Projects getProjects() throws SQLException {
        if (projects == null) {
            projects = new Projects();
            String query = "SELECT id, name FROM Projects";
            ResultSet resultSet = statement.executeQuery(query);
            Project project;
            while(resultSet.next()) {
                project = new Project();
                project.setId(resultSet.getInt(1));
                project.setName(resultSet.getString(2));
                projects.addProject(project);
        return projects;
    public void addNewProject(Project project) throws SQLException {
        String query =
            "INSERT INTO Projects (name) VALUES ('" + project.getName() + "')";
        statement.execute(query);
        query =
            "SELECT MAX(id) FROM Projects";
        ResultSet resultSet = statement.executeQuery(query);
        resultSet.next();
        project.setId(resultSet.getInt(1));
        projects.addProject((Project) project.clone());
    public void removeExistingProject(int id) throws SQLException {
        String query =
            "DELETE FROM Projects WHERE id = " + id;
        statement.execute(query);
        projects.removeProject(id);
    public void updateExistingProject(Project project) throws SQLException {
        String query =
            "UPDATE Projects SET name = '" + project.getName() +
                "' WHERE id = " + project.getId();
        statement.execute(query);
        projects.getProject(project.getId()).setName(project.getName());
}So the first question I have is: is this appropriate? I've set up the data access object correctly? I feel like I'm basically reproducing the Projects class... do I even need this class anymore? I certainly don't use it in any of the JSP pages (as you will see).
Also, I've simply added it to the application context here. Is that the correct way to create and access a data access object like this one?
The second question is: the form's action parameter is a JSP page that acts as a semi-controller, reads the parameters from the form, and passes that information to a class, which then determines where next to send the application. Does this make sense? I'm not really sure of the idea of using a JSP page as a controller, but I don't know any other way to get the results of the form to the controller class.
Here is the controller JSP, ProjectsController.jsp:
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ page pageEncoding="UTF-8" %>
<jsp:useBean id="projectsDAO"
             class="com.emptoris.dataAccess.ProjectsDataAccessObject"
             scope="application" />
<jsp:useBean id="projectsController"
             class="com.emptoris.controller.ProjectsController"
             scope="request">
  <jsp:setProperty name="projectsController" param="action" property="action" />
</jsp:useBean>
<jsp:forward page="<%= response.encodeURL(
                           projectsController.getDestinationPage()
                       ) %>" />and here is the ProjectsController class:
package com.emptoris.controller;
public class ProjectsController {
    private String action;
    public ProjectsController() {
    public String getDestinationPage() {
        if (action.equals("Add New Project"))
            return "AddProject.jsp";
        else if (action.equals("Edit Project"))
            return "EditProject.jsp";
        else if (action.equals("Delete Project"))
            return "DeleteProject.jsp";
        return null;
    public void setAction(String action) {
        this.action = action;
}I'll stop there. I think this is enough information to give me feedback on what I've done thus far. If I've been unclear about something, please let me know and I'll fill in the blanks, or post more code if necessary. Also, feel free to comment on other aspects of the design and style that you see in this code; I'm here to learn, so even if I haven't brought it up, that just means I don't yet see the issues of what I've done yet. :)
Thanks again for all of your help!
Regards,
Anthony Frasso

hi,
My best advise not to for any IDE.
If you do all the things manually, you will get the idea of the reason of doing. if you go with IDE, for ex, if you are creating session bean, IDE itself will create some files for you, these things you will not get to know.
if you create these things manually, usually you will get lot of errors, so you will get lot of experience than using any IDE.
if you are going to develop any project or application at that time you can use NetBeans or eclipse or some other ide u like.

Similar Messages

  • Connect JavaFx(Applets) to J2EE - best practice & browser session

    Hi there,
    I’m new to JavaFX and Applet programming but highly interested.
    What I don’t get at the moment is how you connect the locally executed code of the applet to your system running on a server (J2EE).
    Of course there seem to be different ways but I would like to avoid using RMI or things like that because of the problem with firewalls and proxies.
    So I would like to prefer using HTTP(s) connection.
    And here my questions:
    1.) Is there any best practice around? For example: using HTTP because of the problems I mentioned above. Sample code for offering java method via HTTP?
    2.) Is there a possibility to use the browser session? My J2EE applications are normally secured. If the user opens pages he has to login first and has than a valid session.
    Can I use the applet in one of those pages and use the browser environment to connect? I don’t want the user to input his credentials on every applet I provide. I would like to use the existing session.
    Thanks in advance
    Tom

    1) Yes. If you look at least at the numerous JavaFX official samples, you will find a number of them using HttpRequest to get data from various servers (Flickr, Amazon, Yahoo!, etc.). Actually, using HTTP quite insulates you from the kind of server: it doesn't matter if it run servlets or other Java EE stuff, PHP, Python or other. The applet only knows the HTTP API (GET and POST methods, perhaps some other REST stuff).
    2) It is too long since I last did Java EE (was still J2EE...), so I can't help much, perhaps somebody will shed more light on the topic. If the Web page can use JavaScript to access this browser session, it can provide this information to the JavaFX applet (JS <-> JavaFX communication works as well as with Java applets).

  • Setting up a new SCOM Enviroment best practice pointers

    Hello
    I currently have SCOM 2007 R2 and am looking to implement SCOM 2012 R2. We have decided to start a fresh and start with a new Management Group (rather than upgrade the existing SCOM 2007 R2 environment, as there is a lot of bed practice, lessons learnt we
    do not want to bring over to the new environment).
    I am looking for some practical advise please on how to avoid pitfalls down the line.
    For example, in the past as was recommend when installing a new MP, I would create a new unsealed MP to store any overrides for the newly imported sealed MP. So lets say I imported a MP called "System XZY" I would then create an unsealed MP called
    "Override SYSTEM XYZ" now on the surface that looks fine, but when you sort in the Console they do not end up next to each other due to the console sorting alphabetically on the first letter.
    Therefore I should have called the MP "System XYZ Override" and the same for the others too, they way they would of all sorted next to one another sealed and its equivalent unsealed MP.
    The above is a very simply example of where doing some thing one way although looks OK at the start would have been much better to do another way.
    Also when it comes to Groups in used to create a group in an unsealed MP (e.g. the override MP) relevant to the rule/monitor application in question. The issue is as you know with unsealed MP you cannot reference the Group from another MP. Therefore
    if I needed to reference the same group of computers again for another reason MP I could not without creating another Group and thereby duplication and more work for the RMS to do populating/maintaining these groups.
    However I have also read that creating and MP for Groups then sealing and unsealing to add more groups etc. can be an issue on its own, not sure they this sealing/unsealing of a MP dedicated to Groups would be an issue, perhaps someone has experience of
    this and can explain?
    I would be very grateful for any advise (URL to document etc.) which best practice tips, to help avoid things such as the above down the line.
    Thanks all in advance
    AAnotherUser

    The following articles are helpful for you to implement SCOM 2012 R2
    System Center Operations Manager 2012: Expand Monitoring with Ease
    http://technet.microsoft.com/en-us/magazine/hh825624.aspx
    Operations Manager 2012 Sizing Helper Tool
    http://blogs.technet.com/b/momteam/archive/2012/04/02/operations-manager-2012-sizing-helper-tool.aspx
    Best practices to use when you configure overrides in System Center Operations Manager
    http://support.microsoft.com/kb/943239/en-us
    Best Practices When Creating Dashboards In OM12
    http://thoughtsonopsmgr.blogspot.hk/2012/09/best-practices-when-creating-dashboards.html
    Roger

  • Feedback: ACME - J2EE Best Practices Sample

    Hi!
    Today I'd like to provide some feedback on the aforementioned samples one can download
    from the following location:
    http://otn.oracle.com/products/ias/files/J2EE_Best_Practices_Sample_Code.zip
    I hope you'll find it useful...
    I unzipped the file and followed the instructions given in ReadMe.html, created the database user and tables (Create_User.sql, Best_Practices_DDL.sql).
    Well no problems so far. Just a question. Why not using something like NUMBER(10,2) instead of FLOAT(10)
    for the cost of a product? But this is just a sidenote.
    Lets come to the real big mistakes in this example which make it hard to call this an example of best practices.
    1)
    Sign in as admin/admin and try to edit your profile! It won't work. In your browser you'll see the following message:
    "Validation Error
    You must correct the following error(s) before proceeding:
    Invalid Username, already exists. Please try again."
    And on your console:
    javax.ejb.ObjectNotFoundException: No such entity: admin
    javax.ejb.ObjectNotFoundException: No such entity: admin
    Digging into the source the flow is:
    UserEditAction.java -> UserForm.java -> user.jsp -> UserSaveAction.java (getting action "edit") ->
    User.java -> CustomerUtility.java -> UserFacadeBean.java -> ...
    Lets have a look in the reverse order starting with UserFacadeBean.updateCustomer(User user):
    Line 54: CustomerEJBLocal customerLocal = userLocalHome.findByPrimaryKey(user.getID());
    Looks good, as far as user.getID() returns the primary key. Lets skip CustomerUtitity because it only
    locates the SessionFacade and passes the user object without modifications.
    User.java is the value object created in UserSaveAction.perform:
    Line 25: user.setID(((UserForm) form).getUserName());
    Line 26: user.setUserName(((UserForm) form).getUserName());
    Line 25 is obviously wrong. There are different possibilities to fix this. One quick (and dirty) change would be to alter
    CustomerEJBLocal customerLocal = userLocalHome.findByPrimaryKey(user.getID());
    in:
    CustomerEJBLocal customerLocal = userLocalHome.findByUsername(user.getID());
    or effectly the same and far better to understand:
    CustomerEJBLocal customerLocal = userLocalHome.findByUsername(user.getUserName());
    May be this was the intended solution. By the way there is no unique key on customer.username in the database. Another solution is to use the primary key. But then you have to alter the application starting at UserEditAction.java. You'll probably know what to do...
    2)
    This problem should only occur if your NLS_NUMERIC_CHARACTERS is set to ",.". Nevertheless the root cause is bad programming. Look for
    String getCost() and setCost(String ...)
    or
    String getTotalCost() and setTotalCost(String ...)
    or
    return "" + _cost;
    and so on.
    Ugly... and remember the database field is a FLOAT(10)!
    The mapping in orion-ejb-jar.xml looks like that:
    <cmp-field-mapping name="totalcost" persistence-name="TOTALCOST" persistence-type="FLOAT(10)"/>
    That's why you'll get an ORA-01722:INVALID NUMBER exception during the cast.
    A String '123.12' is wrong if you have a database with German NLS settings for example.
    Anyway one should NEVER use Strings in such a place. I'd strongly recommend that you remove both issues!
    Besides this, I would like to thank you for providing samples on OTN. They are of great value for beginners like me. Perhaps you could just try to test the examples more seriously. Especially for beginners it's hard to believe that there should be something wrong in those samples.
    This could end up in frustrated users thinking they are as thick as two short planks. :-)
    Regards,
    Eric

    Hello Eric -
    Thanks for the feedback, it is very helpful and appreciated.
    1)Sign in as admin/admin and try to edit your profile! It >won't work. In your browser you'll see the following >message:"Validation ErrorWe've rectified this problem and the new zip file should appear on OTN within 24 hours.
    The root cause was an error in one of the SQL scripts that populated the "customer" table.
    The response from the developer responsible for this application is pasted below.
    The first error is a data >error. I did make it where >username and id are both actually the username, so the >code referencing the username as the id was just a >shortcut. There really is not a need for both the >username and id fields in this example.
    Both should be constrained to be unique with the id >actually being the key. I originally
    was going to allow users to change their usernames, that >is why both the username and id fields.
    In the released version of the DDL file the id is not set >to the username.[it should read]
    insert into "ACMEADMIN"."CUSTOMER" values ('admin',
    'Administrator', '555 Elm St. NoWhere USA', >'555-555-5555', 'admin', 'admin');cheers
    -steve-

  • New whitepaper: Oracle9iAS Best Practices

    Check out the newly published whitepaper on Oracle9iAS Release 2 best practices:
    http://otn.oracle.com/products/ias/ohs/collateral/r2/bp-core-v2.PDF
    Ashesh Parekh
    Oracle9iAS Product Management

    Carl,
    There is really no set number or best practice for the number of segments. It is driven by the needs of your organization based upon reporting requirement, collective bargaining agreements, the degree of organizational change occurring within the enterprise, etc. I do believe that "less" segments usually makes more sense from a maintenance and ease of use perspective. Jobs are available across the Business Group, unlike positions, which are subordinate and specific to jobs and organizations...so you'll be maintaining less of them (hopefully).
    Regards,
    Greg

  • New Library? Best Practices?

    I have a large photo library within Aperture and I would like to move a handful of projects that I rarely look at onto an external harddrive to lighten the load on my MacBook Pro. I am open to suggestions/best practices. Thank you for your time...

    . I have exported a Folder that has multiple Projects in there. Afterwards I removed the hard drive and made some adjustments to a referenced picture (?) and it allowed me to do so?
    Then your images probably are not yet referenced but still managed. Did you use "File -> Export -> Master" or "File -> Relocate Master" to turn your images into referenced images? Export will just create copies, you need to relocate the masters.
    To check if your images are relocated, you can either turn on Badge overlays, then you will see arrow badges on the referenced images (see: How Badge Overlays Appear in Aperture: 
    http://documentation.apple.com/en/aperture/usermanual/index.html#chapter=11%26se ction=9%26tasks=true
    ) or create a smart album with the rule: "File status is: referenced".
    This album will collect any referenced file.
    Regards
    Léonie

  • J2EE Best Practices on Cache (I know there's a lot of answers but...)

    Hello friends,
    i'm developing a JSP-Servlet MVC application and I have the following problem. I want to control errors at low level, so i want to permit send a form, presenting a error message in a new window with a back button that cals history.back(). The problem is that I want that user data must not be rewrited. I hope that form backs to exactly the same point before user submits. When i play with the cache headers, all i get is have the data back, but when i try to submit from selects or change anything ans submits, the response is the same, like if I repaeat the same inputs.
    I tried cache-control: no-cache,no-store,post-check=0,pre-ceck=0
    and the HTTP1.0 pragma no-cache
    all with expires clausule. But i can't get what I want. Browser disables submit button, and if not I have problems with selects onchange (which acts in fact like a submit by the button) and when I fight that troubles, then I find that user must rewrite the form data during a histroy.back() event.
    So my question is, once i said all this things, which is the best way to implement that functionality??
    Please help me it's very improtant for me, i've read HTTP RFC inclusive, but I just don't get it after combine everything from my JSP filter (setResponse).
    Thank you very much in advance, hope you can help me

    What kind of TV is it?
    The most common way to hook up a laptop to an external display is with the VGA connection.
    VGA connections are fairly common on modern flat panels. If you're trying to connect to a standard definition CRT(tube) TV, an s-video video connection may be possible if both the laptop and TV support s-video. Quality will be poor, however.
    Disclosure: Former BBY employee.

  • Migrating to new Mac. Best Practices?

    I just ordered my first Mac Pro and will be migrating Aperture (and everything else) from my MacBook Pro in a few days.
    Question is: Use Migration Assistant or not?
    I've heard good stories and bad about people using Migration Assistant and I'm wondering if anyone has some good advice on whether I should trust it.
    Some details about my particular situation:
    My photography is the most critical content on my MBPro.
    I use Aperture with a few plugins (Nik, and others)
    All my images are referenced to an external drive.
    Other critical apps include Adobe CS3 Photoshop, Illustrator, Dreamweaver
    I also have 150+ other apps that can be installed (or not) easily and individually.
    Thanks.

    i would not recommend migrating applications ... ever ... at all ... especially the pro apps ...
    things can go wrong ...
    obviously the choice is yours to make, but me, never ... i have all my install disks and would just do it manually ... why take the chance on screwing up a new clean fresh computer ...
    this is a topic that pops up now and again ... you can search this board for more opinions ...

  • Best Practice Implementation for Enterprise Portal

    hi,
    I am doing Best Practice Implementation on Enterprise Portal.
    In that i cant find one file. Can you please help me in finding these file "BP_RAPID_ALL.epa"
    Thanks in Advance
    Regards,
    Raju

    Hi All,
    Till now no one has answered for my query.
    can i know is there any replacment for this file(BP_RAPID_ALL.epa) in new version of Best Practices.
    Regards,
    Raju
    Edited by: V R K Raju P on Feb 17, 2009 1:04 PM

  • Best practice for distributing/releasing J2EE applications.

    Hi All,
    We are developing a J2EE application and would like some information on the best
    practices to be followed for distributing/releasing J2EE applications, in general.
    In particular, the dilemma we have is centered around the generation of stub, skeleton
    and additional classes for the application.
    Most App. Servers can generate the required classes while deploying the EJBs in the
    application i.e. at install time. While some ( BEA Weblogic and IBM Websphere are
    two that we are aware of ) allow these classes to be generated before the installation
    time and the .ear file containing the additional classes is the one that is uploaded.
    For instance, say we have assembled the application "myapp.ear" . There are two ways
    in which the classes can be generated. The first is using 'ejbc' ( assume we are
    using BEA Weblogic ), which generates the stub, skeleton and additional classes for
    the application and returns the file, say, "Deployable_myapp.ear" containing all
    the necessary classes and files. This file is the one that is then installed. The
    other option is to install the file "myapp.ear" and let the Weblogic App. server
    itself, generate the required classes at the installation time.
    If the first way, of 'pre-generating' the stubs is followed, does it require us to
    separately generate the stubs for each versions of the App. Server that we support
    ? i.e. if we generate a deployable file having the required classes using the 'ejbc'
    of Weblogic Ver5.1, can the same file be installed on Weblogic Ver6.1 or do we
    have to generate a separate file?
    If the second method, of 'install-time-generation' of stubs is used, what is the
    nature/magnitude of the risk that we are taking in terms of the failure of the installation
    Any links to useful resources as well as comments/suggestions will be appreciated.
    TIA
    Regards,
    Aasif

    Its much easier to distribute schema/data from an older version to a newer one than the other way around. Nearly all SQL Server deployment features supports database version upgrade, and these include the "Copy Database" wizard, BACKUP/RESTORE,
    detach/attach, script generation, Microsoft Sync framework, and a few others.
    EVEN if you just want to distribute schemas, you may want to distribute the entire database, and then truncate the tables to purge data.
    Backing up and restoring your database is by far the most RELIABLE method of distributing it, but it may not be pratical in some cases because you'll need to generate a new backup every time a schema change occurs, but not if you already have an automated
    backup/maintenance routine in your environment.
    As an alternative, you can Copy Database functionality in SSMS, although it may present itself unstable in some situations, specially if you are distributing across multiple subnets and/or domains. It will also require you to purge data if/when applicable.
    Another option is to detach your database, copy its files, and then attach them in both the source and destination instances. It will generate downtime for your detached databases, so there are better methods for distribution available.
    And then there is the previously mentioned method of generating scripts for schema, and then using an INSERT statement or the import data wizard available in SSMS (which is very practical and implements a SSIS package internally that can be saved for repeated
    executions). Works fine, not as practical as the other options, but is the best way for distributing databases when their version is being downgraded.
    With all this said, there is no "best practice" for this. There are multiple features, each offering their own advantages and downfalls which allow them to align to different business requirements.

  • What are best practice for packaging and deploying j2EE apps to iAS?

    We've been running a set of J2EE applications on a pair of iAS SP1b for about a year and it has been quite stable.
    Recently however we have had a number of LDAP issues, particularly when registering and unregistering applications (registering ear files sometimes fails 1st time but may work 2nd time). Also We've noticed very occasionally that old versions of classes sometimes find their way onto our machines.
    What is considered to be best practice in terms of packaging and deployment, specifically:
    1) Packaging - using the deployTool that comes with iAS6 SP1b to package is a big manual task, especially when you have 200+ jsp files. Are people out there using this or are they scripting it with a build tool such as Ant?
    2) Deploying an existing application to multiple iAS's. Are you guys unregistering old application then reregistering new application? Are you shutting down iAS whilst doing the deployment?
    3) Deploying ear files can take 5 to 10 mins, is this normal?
    4) In a clustered scenario where HTTPSession is shared what are the consequences of doing deployments to data stored in session?
    thanks in asvance for your replies
    Owen

    You may want to consider upgrading your application server environment to a newer service pack. There are numerous enhancements involving the deployment tool and run time layout of your application that make clear where you're application is loading its files from.
    If you've at a long running application server environment, with lots of deployments under your belt, you might start to notice slow downs in deployment and kjs start time. Generally this is due to garbage collecting in your iAS registry.
    You can do several things to resolve this. The most complete solution is to reinstall the application server. This will guarantee a clean ldap registry. Of course you've got to restablish your configurations and redeploy your applications. When done, backup your application server install space with the application server and directory server off. You can use this backup to return to a known configuation at some future time.
    For the second method: <B>BE CAREFUL - BACKUP FIRST</B>
    There is a more exhaustive solution that involves examining your deployed components to determine the active GUIDS. You then search the NameTrans section of the registry searching for Applogic Servlet *, and Bean * entries that represent your previously deployed components but are represented in the set of deployed GUIDs. Record these older GUIDs, remove them from ClassImp and ClassDef. Finally remove the older entries from NameTrans.
    Best practices for deployment depend on your particular environmental needs. Many people utilize ANT as a build tool. In later versions of the application server, complete ANT scripts are included that address compiling, assembly and deployment. Ant 1.4 includes iAS specific targets and general J2EE targets. There are iAS specific targets that can be utilized with the 1.3 version. Specialized build targets are not required however to deploy to iAS.
    Newer versions of the deployment tool allow you to specify that JSPs are not to be registered automatically. This can be significant if deployment times lag. Registered JSP's however benefit more fully from the services that iAS offers.
    2) In general it is better to undeploy then redeploy. However, if you know that you're not changing GUIDs, recreating an existing application with new GUIDs, or removing registered components, you may avoid the undeploy phase.
    If you shut down the KJS processes during deployment you can eliminate some addition workload on the LDAP server which really gets pounded during deployment. This is because the KJS processes detect changes and do registry loads to repopulate their caches. This can happen many times during a deployment and does not provide any benefit.
    3) Deploying can be a lengthy process. There have been improvements in that performance from service pack to service pack but unfortunately you wont see dramatic drops in deployment times.
    One thing you can do to reduce deployment times is to understand the type of deployment. If you have not manipulated your deployment descriptors in any way, then there is no need to deploy. Simply drop your newer bits in to the run time space of the application server. In later service packs this means exploding the package (ear,war, or jar) in to the appropriate subdirectory of the APPS directory.
    4) If you've changed the classes of objects that have been placed in HTTPSession, you may find that you can no longer utilize those objects. For that reason, it is suggested that objects placed in session be kept as simple as possible in order to minimize this effect. In general however, is not a good idea to change a web application during the life span of a session.

  • Hotfix Management | Best Practices | WCS | J2EE environment

    Hi All,
    Trying to exploit some best practices around hotfix management in a J2EE environment. After some struggle, we managed to handle the tracking of individual hotfixes using one of our home-grown tools. However, the issue remains on how to manage the 'automated' build of these hotfixes, rather than doing the same manually, as we are currently doing.
    Suppose we need to hotfix a particular jar file on a production environment, I would need to understand how to build 'just' that particular jar. I understand we can label the related code (which in this case could be just a few java files). Suppose this jar contains 10 files out of which 2 files need to be hotfixed. The challenge is to come up with a build script which builds -
    - ONLY this jar
    - the jar with 8 old files and 2 new files.
    - the jar using whatever dependent jars are required.
    - the hotfix build script needs to be generic enough to handle the hotfix build of any jar in the system.
    Pointers, more in line with a WCS environment would be very much appreciated!
    Regards,
    Mrinal Mukherjee

    Moderator Action:
    This post has been moved from the SysAdmin Build & Release Engineering forum
    To the Java EE SDK forum, hopefully for closer topic alignment.
    @)O.P.
    I don't think device driver build/release engineering is what you were intending.
    Additionally, your partial post that was accidentally created as a duplicate to this one
    has been removed before it confuses anyone.

  • Best Practices when replacing 2003 server R2 with a new domainname and server 2012 r2 on same lan network

    I have a small office (10 computers with five users) that have a Windows 2003 server that has a corrupted AD. Their 2003 server R2 is essentially a file server and provides authentication.  They purchased a new Dell 2012 R2 server.  
    It seems easier to me to just create a new domain (using their public domain name).  
    But I need as little office downtime. as possible . Therefore I would like to promote this server to its new domain on the same lan as the current domain server.  I plan to manually replicate the users and folder permissions.  Once done, I plan to
    remove the old server from the network and join the office computers to the new domain.  
    They also they are also running a legacy application that will require some tweaking by another tech. I have been hoping to prep the new domain prior to new legacy tech arriving.  That is why I would like both domain to co-exist temporarily. I have read
    that the major issues involved in this kind of temporary configuration will then be related to setting up dns.  They are using the firewall to provide dhcp.
    Are there any best practices documents for this situation?
    Or is there a better or simpler strategy?
    Gary Metz

    I followed below two links. I think it should be the same even though the links are 2008 R2 migration steps.
    http://kpytko.pl/active-directory-domain-services/adding-first-windows-server-2008-r2-domain-controller-within-windows-2003-network/
    http://blog.zwiegnet.com/windows-server/migrate-server-2003-to-2008r2-active-directory-and-fsmo-roles/
    Hope this help!

  • Best Practices for new iMac

    I posted a few days ago re failing HDD on mid-2007 iMac. Long story short, took it into Apple store, Genius worked on it for 45 mins before decreeing it in need of new HDD. After considering the expenses of adding memory, new drive, hardware and installation costs, I got a brand new iMac entry level (21.5" screen,
    2.7 GHz Intel Core i5, 8 GB 1600 MHz DDR3 memory, 1TB HDD running Mavericks). Also got a Superdrive. I am not needing to migrate anything from the old iMac.
    I was surprised that a physical disc for the OS was not included. So I am looking for any Best Practices for setting up this iMac, specifically in the area of backup and recovery. Do I need to make a boot DVD? Would that be in addition to making a Time Machine full backup (using external G-drive)? I have searched this community and the Help topics on Apple Support and have not found any "checklist" of recommended actions. I realize the value of everyone's time, so any feedback is very appreciated.

    OS X has not been officially issued on physical media since OS X 10.6 (arguably 10.7 was issued on some USB drives, but this was a non-standard approach for purchasing and installing it).
    To reinstall the OS, your system comes with a recovery partition that can be booted to by holding the Command-R keys immediately after hearing the boot chimes sound. This partition boots to the OS X tools window, where you can select options to restore from backup or reinstall the OS. If you choose the option to reinstall, then the OS installation files will be downloaded from Apple's servers.
    If for some reason your entire hard drive is damaged and even the recovery partition is not accessible, then your system supports the ability to use Internet Recovery, which is the same thing except instead of accessing the recovery boot drive from your hard drive, the system will download it as a disk image (again from Apple's servers) and then boot from that image.
    Both of these options will require you have broadband internet access, as you will ultimately need to download several gigabytes of installation data to proceed with the reinstallation.
    There are some options available for creating your own boot and installation DVD or external hard drive, but for most intents and purposes this is not necessary.
    The only "checklist" option I would recommend for anyone with a new Mac system, is to get a 1TB external drive (or a drive that is at least as big as your internal boot drive) and set it up as a Time Machine backup. This will ensure you have a fully restorable backup of your entire system, which you can access via the recovery partition for restoring if needed, or for migrating data to a fresh OS installation.

  • (Request for:) Best practices for setting up a new Windows Server 2012 r2 Hyper-V Virtualized AD DC

    Could you please share your best practices for setting up a new Windows Server 2012 r2 Hyper-V Virtualized AD DC, that will be running on a new WinSrv 2012 r2 host server.   (This
    will be for a brand new network setup, new forest, domain, etc.)
    Specifically, your best practices regarding:
    the sizing of non virtual and virtual volumes/partitions/drives,  
    the use of sysvol, logs, & data volumes/drives on hosts & guests,
    RAID levels for the host and the guest(s),  
    IDE vs SCSI and drivers both non virtual and virtual and the booting there of,  
    disk caching settings on both host and guests.  
    Thanks so much for any information you can share.

    A bit of non essential additional info:
    We are small to midrange school district who, after close to 20 years on Novell networks, have decided to design and create a new Microsoft network and migrate all of our data and services
    over to the new infrastructure .   We are planning on rolling out 2012 r2 servers with as much Hyper-v virtualization as possible.
    During the last few weeks we have been able to find most of the information we need to undergo this project, and most of the information was pretty solid with little ambiguity, except for
    information regarding virtualizing the DCs, which as been a bit inconsistent.
    Yes, we have read all the documents that most of these posts tend point to, but found some, if not most are still are referring to performing this under Srvr 2008 r2, and haven’t really
    seen all that much on Srvr2012 r2.
    We have read these and others:
    Introduction to Active Directory Domain Services (AD DS) Virtualization (Level 100), 
    Virtualized Domain Controller Technical Reference (Level 300),
    Virtualized Domain Controller Cloning Test Guidance for Application Vendors,
    Support for using Hyper-V Replica for virtualized domain controllers.
    Again, thanks for any information, best practices, cookie cutter or otherwise that you can share.
    Chas.

Maybe you are looking for