'Best practice' - separating packages, classes, methods.

I'm writing a few tools for handling classical propositional logic sentences.
I currently have a parser (using JavaCC)
Various reasoning methods (e.g. finding whether sentences are satisfiable or a contradition, whether two sentences are equivalent, converting to conjunctive/disjunctive normal form etc.)
I can export/import sentences to/from XML
I'm now coming to a tidying up stage. I'm using Eclipse 3.3 and within the project have 4 packages: logic, parser, xml, testing.
The tree data structures are created using the JavaCC parser - because I want to leave the JavaCC generated code alone as much as possible I've created a 'LogicOperations' class containing the methods.
I also have an 'Interpretation' class that holds a TRUE/FALSE value for each atom, e.g. if storing an example where a sentence is satisfiable (= evaluates to true).
Most of the methods that take an Interpretation as an argument are held inside the 'LogicOperations' class too currently.
So in a test class I might have
LogicParser parser = new LogicParser(new StringReader("a | (b & c) => !d"));
SimpleNode root = parser.query();
//displays the above String in it's tree form
root.dump();
// List atoms in sentence
System.out.println(Arrays.toString(LogicOperations.identifyAtoms(root)));
// Show models (interpretations where sentence is TRUE)
LogicOperations.printInterpretations(LogicOperations.models(root));
// is the sentence satisfiable?
System.out.println("Satisfiable: " + LogicOperations.isSatisfiable(root));
// is the sentence a contradiction?
System.out.println("Contradiction: " + LogicOperations.isContradiction(root));
// Is the sentence consistent (a tautology)
System.out.println("Consistent: " + LogicOperations.isConsistent(root));
System.out.println("CNF: " + LogicOperations.printCNF(root));
System.out.println("DNF: " + LogicOperations.printDNF(root));Question is - does separating out methods, classes and packages in this way seem the 'correct' way of doing things? It works, which is nice... but is it sloppy, lazy, bad practice, you name it...
If any example code is worth seeing let me know, but I'm mainly after advice before I go about tidying the code up.
Thanks in advance
Duncan

eknight wrote:
My intuition would be to be able to call:
root.isSatisfiable()Instead of having to go through a helper Method. The Functionality could still remain in LogicOperations, but I would encapsulate it all in the SimpleNode Class.
- Just MHOThe SimpleNode class is one of a number of classes generated by JavaCC. My thinking was that if there are any modifications to the grammar then SimpleNode would be regenerated and the additional methods would need to be added back in, whereas if they're in a separate class it would mean I wouldn't have to worry about it. In the same vein, I have the eval() method separate from SimpleNode, and most other methods rely on it for their output.
public static Boolean eval(SimpleNode root, Interpretation inter) {
     Boolean val = null;
     SimpleNode left = null;
     SimpleNode right = null;
     switch (root.jjtGetNumChildren()) {
     case 1:
          left = root.jjtGetChild(0);
          right = null;
          break;
     case 2:
          left = root.jjtGetChild(0);
          right = root.jjtGetChild(1);
          break;
     default:
          break;
     switch (root.getID()) {
     case LogicParserTreeConstants.JJTROOT:
          val = eval(left, inter);
          break;
     case LogicParserTreeConstants.JJTVOID:
          val = null;
          break;
     case LogicParserTreeConstants.JJTCOIMP:
          val = (eval(left, inter) == eval(right, inter));
          break;
     case LogicParserTreeConstants.JJTIMP:
          val = (!eval(left, inter) || eval(right, inter));
          break;
     case LogicParserTreeConstants.JJTOR:
          val = (eval(left, inter) || eval(right, inter));
          break;
     case LogicParserTreeConstants.JJTAND:
          val = (eval(left, inter) && eval(right, inter));
          break;
     case LogicParserTreeConstants.JJTNOT:
          val = !eval(left, inter);
          break;
     case LogicParserTreeConstants.JJTATOM:
          val = inter.get(root.getLabel());
          break;
     case LogicParserTreeConstants.JJTCONSTFALSE:
          val = false;
          break;
     case LogicParserTreeConstants.JJTCONSTTRUE:
          val = true;
          break;
     default:
          val = null;
          break;
     return val;
}

Similar Messages

  • SAP Best Practices Business Package Transport Error

    Hi all,
           We tried to import the SAP Best Practices Business package but we are unable to import the file.  We have checked the log file ...Below is the log file...
    [code]
    #1.5#001321CB9A4500510000022100001F7800040025EB1E5E74#1126062765280#com.sap.portal.transport#sap.com/irj#com.sap.portal.transport#Administrator#1033##DEV1_EPD_9515850#Administrator#7b5495401f4b11da9472001321cb9a45#SAPEngine_Application_Thread[impl:3]_9##0#0#Error#1#/System/Server#Java### [com.sapportals.portal.transport.ui.ImportComponent] File upload failed.
    [EXCEPTION]
    #1#java.io.IOException: Bad ZIP file format: C:
    WINDOWS
    TEMP
    _htmlb11260627630311218.tmp; does not contain a package file.
         at com.sapportals.portal.transport.ui.ImportComponent.extractPackageZip(ImportComponent.java:1959)
         at com.sapportals.portal.transport.ui.ImportComponent.doFileUpload(ImportComponent.java:822)
         at com.sapportals.portal.transport.ui.ImportComponent.doOnUpdatePreviewPage(ImportComponent.java:536)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleRequestEvent(AbstractPortalComponent.java:700)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.handleEvent(AbstractPortalComponent.java:412)
         at com.sapportals.portal.prt.pom.ComponentNode.handleEvent(ComponentNode.java:252)
         at com.sapportals.portal.prt.pom.PortalNode.fireEventOnNode(PortalNode.java:369)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:707)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:232)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:153)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    [/code]
    Does anyone faced the similar issue as above???
    Regards
    Vasu

    Hello Vasudevan,
      Unzip the content of the Business Package zip file into some folder. While importing the business package, select the .pkg file in the unzipped folder. This solves your problem.
    Best Regards,
    Srinivas.

  • Help: Best Practice Baseline Package experience

    All,
    Can I ask for some feedback from folks who've used the Best Practice Baseline package before - I'm in a project implementing ECC 6.0 and we're planning to use this package to quickly set up and demo the system to the business.  I've limited experience in config and system setup so your advice is much appreciated
    Specifically my questions:
    1.  Has anyone used the package for a similar purpose (quick setup to demo to business)?  Does it save a lot of time or should our team just configure the system manually?  Are there pitfalls I should be aware of?
    2.  I understand a limited amount of config / master data customisation can be done and there's even a wizard.  Is it effective and error-free - i.e., will I be better off by installing the base package and make changes later manually ?
    3.  Assuming after the demo we have firmed business requirements, which approach would be faster and easier?  Configuring from scratch vs. using existing BP baseline then doing delta configuration?
    4.  Does the documentation tell me exactly what was configured and the settings used?
    Appreciate any help and insight you can offer, thanks!!

    Dear Jin,
    The following help link should answer your queries:
    http://help.sap.com/bp_grcv152/GRC_US/Documentation/SAP_APJ_BP_Study_2006_CS.ppt#418,1,Slide  of SAP Best Practice
    Regardes,
    Naveen.

  • Install The ERP SAP Best Practices Baseline Package (VE)

    Hello
    We would like to install The ERP SAP Best Practices Baseline Package (VE)
    And reviewing the  Quick Guide to Installing the SAP Best Practices Baseline Package (VE), included in the SAP NOTE 1171816, in the list of components installed we need SAP ERP 6.0 with EhP3 with support package stack 1, but we received the installation disc of the Ehp4, and this version is not supported for the Baseline Package (VE).
    We are unable to find the installation the disc, or the media list for this solution (SAP ECC 6.0 EhP3).
    Can somebody tell me where can i find this?
    The information in the service.sap.com/instguides is about installing EhP4.
    We are using Windows 2008 EE with MS-SQL 2005.
    Thanks for your Help

    Hello Sunny,
    I hava setup MOPZ, and uploaded the correct packages to the SAINT transaction, but it gives me a warning, i need to include the following files to my upgrade queue:
    EA-APPL, 603       SAPK-603DHINEAAPPL   (SP Level: 0001)
    FINBASIS, 603      SAPK-60301INFINBASIS (SP Level: 0001)
    EA-PS, 603           SAPK-603DHINEAPS     (SP Level: 0001)
    SEM-BW, 603        SAPK-60301INSEMBW    (SP Level: 0001)
    I downloaded the packagesfrom SWDC but still is missing EA-PS, 603 SAPK-603DHINEAPS the file i downloaded was CSN0120061532_0028760.PAT
    In the SAP Note 1083533
    "If you receive the warning stating that additional Support
    Packages (level 0001) must be included in the installation of
    Enhancement Package 3, check the Support Package level of the
    relevant component. You can ignore the warning in the following
    cases:
    All components (Release 600) except EA-HR 600: Support Package
    level 0011
    EA-HR 600: Support Package level 0026
    - Note the following: In the case of a higher Support Package
    level (at least Support Package level 0012 or Support Package
    level 0026 for EA-HR), you must NOT ignore this warning."
    My SP level is 11 for all components and EA-HR is lvl 22, should i ignore this?
    Kind Regards

  • [More information] 'SAP Best Practices Baseline package for Brazil V3.607'

    Hi.
    When I study 'SAP Best Practices Baseline package for
    Brazil V3.607', I wonder somthing.
    I want solution of problem.
    ---------Problem---------
    In '100: SAP Best Practices Installation' document on point 3.4 Define Tax Jurisdiction Code it says
    Enter the Jurisdiction Codes according to the document SMB41_J_1BTXJURV_B020_NFE.TXT.
    I have search the internet for this document and the only hit is the actual Best practice document.
    Does anybody knows where to get this document?
    ASAP, reply for me.
    Thanks.

    Dear Dimitry,
    the Best Practice baseline content is freely available to anyone w/o any charge.
    You find the whole content about it at:
    SAP Best Practices package for Russia V3.607 (English)
    SAP Best Practices package for Russia V3.607 (Russian)
    Kind Regards,
    Jan

  • Install Best Practices- Baseline Package for ECC 6.0 EHP4

    Hi All,
    I know its not the right forum to post this message, but posting here as i didnt get the info from the related forum, apologies for that.
    Now we are planning to install SAP Best practices-Baseline Packages for ECC-EHP4 in our new server.
    Can anybody help me out what are the steps to be carried out. Now we have completed installation of Linux & we want to install BP for General, not for any specific industry.
    B/regds,
    CB

    Please post this question in SAP Basis Forum.
    Alternatively, you can check documents in scribd/ help.sap.com
    Raghavan

  • Importing best practices baseline package (IT) ECC 6.0

    Hello
    I hope is the right forum,
    i've a sap release ECC 6.00 with stack abap 14.
    In this release i have to install the preconfigured smartforms that now are called
    best practices baseline package. These pacakges are localized and mine is for Italy:
    SAP Best Practices Baseline Package (IT)
    the documents about the installation say that the required support package level has to be with stack 10.
    And it says :
    "For cases when the support package levels do not match the Best Practices requirements, especially when HIGHER support package levels are implemented, only LIMITED SUPPORT can be granted"
    Note 1044256
    By your experience , is it possible to do this installation in this support package condition?
    Thanks
    Regards
    Nicola Blasi

    Hy
    a company wants to implement the preconfigured smartforms in a landscape ECC 6.0
    I think that these smartforms can be implement using the SAP best practices , in particular the baseline package ....see service.sap.com/bestpractices  --> baseline package;  once installed you can configured the scenario you want....
    the package to download is different each other ,depends the localization...for example italy or other country but this is not important at the moment....
    the problem is the note 1044256...it says that to implement this, i must have the support package level requested in this note...not lower and above all not higher.......
    before starting with this "baseline package" installation i'd like to know if i can do it because i have a SP level of 14 for aba e basis for example....while the notes says that want a SP level of 10 for aba e basis.
    what i can do?
    i hope is clear now....let me know
    thanks
    Nicola

  • SAP Best Practices Baseline package for Russia V3.607

    Dear colleagues,
    My partner - BearingPoint Russia - has an interest to SAP Best Practices Baseline package for Russia V3.607
    Would you please help to find the contact whom they can ask the questions about content & price to?
    Best regards,
    Dmitry Popov

    Dear Dimitry,
    the Best Practice baseline content is freely available to anyone w/o any charge.
    You find the whole content about it at:
    SAP Best Practices package for Russia V3.607 (English)
    SAP Best Practices package for Russia V3.607 (Russian)
    Kind Regards,
    Jan

  • Help on Installing the SAP Best Practices Baseline Package

    We are in the process of installing the SAP Best Practices Baseline Package. We are on ECC5.0. Any tips/ tricks/ gotchas will be greatly appreciated.

    hi Mani,
    check this out:
    http://help.sap.com/bp_bblibrary/500/documentation/BL_Quick_Guide_EN_DE.doc
    regards
    sham'm

  • Diff Between Best Practices  &  Business Packages

    Dear Master
                    Can u give a brief difference between
                           Best Practices  &  Business Packages?
    thankx

    Hi,
    Best Practices : SAP Best Practices provide a toolset that helps IT and functional project team members to quickly deploy functionality in SAP solutions - from SAP NetWeaver, to core SAP applications. This toolset comprises a mix of step-by-step instructions, preconfiguration, sample master data, code samples (where applicable) and end-user training - organized by technical or business scenarios that you might want to implement in your landscape.
    http://help.sap.com/content/bestpractices/crossindustry/bestp_based_netweaver.htm
    Business Packages : The SAP NetWeaver Portal offers a state-of-the-art portal solution. However, to make a portal useful to all the people it seeks to serve, it must not only provide general portal capabilities, but also content designed specifically to serve users in various industries and business areas.
    SAP provides such pre-assembled content bundled as business packages for completing business tasks. In essence, the business packages provide out-of-the-box portal applications that can be easily modified to suit a customer's needs.
    http://www.sdn.sap.com/irj/sdn/contentportfolio
    Hope this helps.
    Cheers!
    Sandeep Tudumu

  • Best practice regarding package-private or public classes

    Hello,
    If I was, for example, developing a library that client code would use and rely on, then I can see how I would design the library as a "module" contained in its own package,
    and I would certainly want to think carefully about what classes to expose to outside packages (using "public" as the class access modifier), as such classes would represent the
    exposed API. Any classes that are not part of the API would be made package-private (no access modifier). The package in which my library resides would thereby create an
    additional layer of encapsulation.
    However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?
    Thanks in advance!

    Jujubi wrote:
    ...However, thus far I've only developed small applications that reside in their own packages. There does not exist any "client code" in other packages that relies on the code I've
    written. In such a case, what is the best practice when I choose to make my classes public or package-private? Is it relevant?I've always gone by this rule of thumb: Do I want others using or is it appropriate for others to use my methodes. Are my methods "pure" and not containing package speicific coding. Can I guarentee that everything will be initialized correctly if the package is included in other projects.
    Basically--If I can be sure that the code will do what it is supposed to do and I've not "corrupted" the obvious meaning of the method, then I usually make it public--otherwise, the outside world, other packages, does not need to see it.

  • 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.

  • What is the best practice to handle JPA methods in JSF app?

    I am building a JSF-JPA web app(No EJB).
    I have several methods that has JPA QL inside.
    Because I have to put those methods inside JSF beans to inject EntityManagerFactory (am I right about this?).
    And I do want to separate those methods from regular JSF beans which are used by page authors.
    And I may need to use them in different JSF managed beans.
    My question here is that what is the best practice to handle that?
    I. write a or a few separate JSF Beans and inject them into regular Beans?
    II. write a or a few separate JSF Beans and access them into regular Beans using FacesContext?
    III. others?
    Waiting to hear from you opinions.

    You can create named queries on your Entities themselves then just call entityMgr.createNamedQuery("nameOfQuery");
    Normally, we put these named queries in the class of the entity which will be returned. This allows for all information pertaining to a given entity and all ways of accessing that entity (except em.find() and stuff, of course) to be in one place. As long as the entity is defined in your persistence.xml file, any named queries which reside on that entity will be available through the EntityManager.
    As for the EntityManagerFactory, we normally create an application scope bean which holds the factory itself (because this is a heavy-weight object) and then just get all EntityManager instances from that by injecting this bean into whatever needs it. For example, I might have:
    //emfBB is the injected app scope bean which holds the entity manager factory.
    private EmfBB emfBB;
    private void lookupSomeData()
    EntityManager em = this.getEmfBB().getEmf()
    I hope this answered your question?
    ~Zack
    Edited by: zmarr on Nov 6, 2008 1:29 PM

  • Best Practices for Packaging and Deploying Server-Specific Configurations

    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks can
    configure each server's properties at the server. But it appears that an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please let me
    know how.
    Or do we have to build a unique ear for each server? This is possible, of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

    The one draw back to this is you have to go all the way back to ant and the
    build system to make changes. You really want these env variables to be
    late binding.
    cheers
    mbg
    "Sai S Prasad" <[email protected]> wrote in message
    news:[email protected]...
    >
    Paul,
    I have a similar situation in our project and I don't create ear filesspecific
    to the environment. I do the following:
    1) Create .properties file for every environment with the same attributename
    but different values in it. For example, I have phoneix.properties.NT,phoenix.properties.DEV,
    phoenix.properties.QA, phoenix.properties.PROD.
    2) Use Ant to compile, package and deploy the ear file
    I have a .bat file in NT and .sh for Solaris that in turn calls theant.bat or
    ant.sh respectively. For the wrapper batch file or shell script, you canpass
    the name of the environment. The wrapper batch file will copy theappropriate
    properties file to "phonenix.properties". In the ant build.xml, I alwaysrefer
    to phonenix.properties which is available all the time depending on theenvironment.
    >
    It works great and I can't think of any other flexible way. Hope thathelps.
    >
    Paul Hodgetts <[email protected]> wrote:
    We have some server-specific properties that vary for each server. We'd
    like to have these properties collected together in their own properties
    file (either .properties or .xml is fine).
    What is the best-practices way to package and deploy an application (as
    an
    ear file), where each server needs some specific properties?
    We'd kind of like to have the server-specific properties file be stored
    external to the ear on the server itself, so that the production folks
    can
    configure each server's properties at the server. But it appears that
    an
    application can't access a file external to the ear, or at least we can't
    figure out the magic to do it. If there is a way to do this, please
    let me
    know how.
    Or do we have to build a unique ear for each server? This is possible,
    of
    course, but we'd prefer to build one deployment package (ear), and then
    ship that off to each server that is already configured for its specific
    environment. We have some audit requirements where we need to ensure
    that
    an ear that has been tested by QA is the very same ear that has been
    deployed, but if we have to build one for each server, this is not
    possible.
    Any help or pointers would be most appreciated. If this is an old issue,
    my apologies, would you please point me to any previous material to read?
    I didn't see anything after searching through this group's archives.
    Thanks much in advance,
    Paul
    Paul Hodgetts -- Principal Consultant
    Agile Logic -- www.agilelogic.com
    Consulting, Coaching, Training -- On-Site & Out-Sourced Development
    Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA

  • What is the best practice for package source locations?

    I have several remote servers (about 16) that are being utilized as file servers that have many binaries on them to be used by users and remote site admins for content. Can I have SCCM just use these pre-existing locations as package sources, or is this
    not considered best practice? 
    Or
    Should I create just one package source within close proximity to the Site Server, or on the Site Server itself?
    Thanks

    The primary site server is responsible for grabbing the source data and turning it into packages for Distribution points.  so while you can use ANY UNC to be a source location for content, you should be aware of where that content exists in regards
    to your primary site server.  If your source content is in Montana but your primary server is in California ... there's going to be a WAN hit ... even if the DP it's destined for is also in Montana.
    Second, I strongly recommend locking down your source UNC path so that only the servers and SCCM admins can access it.  This will prevent side-loading of content  as well as any "accidental changing" of folder structure that could cause
    your applications/packages to go crazy.
    Put the two together and I typically recommend you create a DSL (distributed source library) share and slowly migrate all your content into it as you create your packages/applications.  You can then safely create batch installers, manage content versions,
    and other things without fear of someone running something out of context.

Maybe you are looking for