How does weblogic render shell?

Hi,
how does weblogic render shell?
below is my shell file fragment,
<netuix:head/>
<netuix:body>
<netuix:header>
<netuix:jspContent contentUri="/framework/skeletons/header/pageHeader.jsp"/>
</netuix:header>
<netuix:jspContent contentUri="/framework/skeletons/navigation/topMenu.jsp" />
<netuix:jspContent contentUri="/framework/skeletons/navigation/leftMenu.jsp"/>
<netuix:footer>
<netuix:jspContent contentUri="/framework/skeletons/footer/pageFooter.jsp"/>
</netuix:footer>
</netuix:body>
Do all jsp (pageHeader.jsp, topMenu.jsp, leftMenu.jsp, pageFooter.jsp) rendered parallaly or they rendered as per the flow (as they defined in shell)?
If I set any request attribute in head.jsp or pageHeader.jsp, will it be available in topMenu.jsp or leftMenu.jsp?

The test-frequency-seconds property specifies the number of seconds between tests of unused connections. WebLogic Server tests unused connection and reopens any faulty connections. You must also set the Test Table Name.
The seconds-to-trust-an-idle-pool-connection property specifies the number of seconds within a connection use that WebLogic Server trusts that the connection is still viable and will skip the connection test during the periodic connection testing process.

Similar Messages

  • How does weblogic render portal skeleton jsps?

    Hi,
    how does weblogic render shell?
    below is my shell file fragment,
    <netuix:head/>
    <netuix:body>
    <netuix:header>
    <netuix:jspContent contentUri="/framework/skeletons/header/pageHeader.jsp"/>
    </netuix:header>
    <netuix:jspContent contentUri="/framework/skeletons/navigation/topMenu.jsp" />
    <netuix:jspContent contentUri="/framework/skeletons/navigation/leftMenu.jsp"/>
    <netuix:footer>
    <netuix:jspContent contentUri="/framework/skeletons/footer/pageFooter.jsp"/>
    </netuix:footer>
    </netuix:body>
    Do all jsp (pageHeader.jsp, topMenu.jsp, leftMenu.jsp, pageFooter.jsp) rendered parallaly or they rendered as per the flow (as they defined in shell)?
    If I set any request attribute in head.jsp or pageHeader.jsp, will it be available in topMenu.jsp or leftMenu.jsp?

    Ellen,
    I am not clear about your question.
    User A will only see the data which is retrieved based on it's principal
    name (I assume you use principal name as an argument to retrieve the data
    from DB).
    If you are using p13n cache make sure the principal name is part of the key.
    Please provide more details if you see that I did not understand your
    question.
    Regards,
    Michael Goldverg
    "ellen" <[email protected]> wrote in message
    news:3d6e46ef$[email protected]..
    >
    My application has multiple portlets which need to display very sensitiveuser
    data.
    These portlets read user principles from session (e.g. <weblogic:getproperty>)
    and make calls to an EJB to retrieve data from database and display theseuser
    specific data.
    I didn't specify any synchronize in my code. My concern is when two useraccess
    the portlet at the exact same time, will user A see user B's data?
    Any suggestions or general guide lines about synchronize in portal will bevery
    helpful.
    Thanks,
    Ellen
    These portlet (.jsp file)

  • How does WebLogic 8.1 get the BASE HREF value?

    We have a WebLogic 8.1 SP4 server with a Juniper DX load balancer in front. We are trying to get Juniper to handle all the SSL traffic for the WebLogic application. Between Juniper and WebLogic, it would be just HTTP and between Juniper and web clients it would be HTTPS. One of the main issues we are seeing is that Struts HTML:BASE tag is returning the Juniper address as we expected, with the correct SSL port and application context/paths. However, the protocol for this base href is set to HTTP and not HTTPS. Consequently, our pages do not load properly.
    I am trying to understand where this value comes from. The underlying code uses request.getScheme() to get the protocol. So, we could "customize" the tags to work around this, but that is a hack that I am trying to avoid. I assume that the HTTP stack that WebLogic 8.1 uses is providing this info from the HTTP request. Does this come from the web browser? How does WebLogic get this to put it into the request object in the web container? We have sniffed the HTTP headers on the web client side and we cannot see where this is coming from.

    I remember facing a similar issue with webloigc 8.1 and apache
    I dont think its a problem with the tag..
    I think i have changed the transport-guarantee in web.xml
    If you have NONE try setting that to CONFIDENTIAL and vice versa

  • How does weblogic maintain idle JDBC connection

    I see weblogic maintaining connections even when they are idle. (unless we explicity mention to remove)
    How does weblogic maintain the socket on DB under idle condition? Does webogic do ping kind of activity to maintain/renew the socket for all idle connections in the pool.

    The test-frequency-seconds property specifies the number of seconds between tests of unused connections. WebLogic Server tests unused connection and reopens any faulty connections. You must also set the Test Table Name.
    The seconds-to-trust-an-idle-pool-connection property specifies the number of seconds within a connection use that WebLogic Server trusts that the connection is still viable and will skip the connection test during the periodic connection testing process.

  • How does WebLogic know it needs XA transaction?

    I've been informed that Weblogic 8.1 "knows" whether it needs to start a global XA transaction or not when it starts a transaction...sparing the overhead of an XA transaction if it is not needed.
              Is this a true statement?...and if so...how does it know that distributed resources will be used in the transaction when it is starting the transaction?
              The main reason I ask is that we are wondering if there is any way to avoid using the XA driver for "every" transaction, when we only need it less than 1% of the time. We would like to avoid the overhead that is introduced with XA.

    WebLogic always performs XA operations, it looks at the resource and checks if it implements the XAResource interface, if it does it uses the XA operations with that resource otherwise the operations will just be a null op.
              So it depends on what resources you use in the tx. If you mix, XA and Non-XA resources in the tx, you may hit heuristic exceptions and inconsistentcies in your data which you will have to manually correct. Also you loose the ability to recover any transactions.

  • How does OBIEE render international character sets?

    Hi.
    Our OBIEE Oracle Business Intelligence 11.1.1.5 application running on Linux x86 (64-bit) and a 11.2.0.2.0 database is using the AL32UTF8 Unicode character.
    So our database will support languages such as Japanese, Spanish etc.
    But how does OBIEE deal with these? How do the webpages know that the content is UTF8 also?
    Thanks for any tips -

    HI Joe:
    Are you able to find any solution for this. I am also stuck with the same issue. Could you please share your solution to me. my email id is: [email protected]
    Thanks & Regards
    Sridhar Doki

  • How does WebLogic clean up stuck threads?

    Hi,
    Using WebLogic 9.2.2 on Linux OS. In our logs, we are finding some stuck threads and it seems to be due to something WebLogic is doing. While we don't understand the cause (maybe the stack trace helps), does WebLogic do anything to remove stuck threads from its pool, or is there anything we can do to configure it to?
    <Jul 21, 2009 2:50:21 PM UTC> <Error> <WebLogicServer> <BEA-000337> <[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)' has been busy for "605" seconds working on the request "Http Request: /RoutingEngine/pcFlow.do", which is more than the configured time (StuckThreadMaxTime) of "600" seconds. Stack trace:
    Thread-69 "[STUCK] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'" <alive, in native, suspended, priority=1, DAEMON> {
    jrockit.net.SocketNativeIO.readBytesPinned(Unknown Source)
    jrockit.net.SocketNativeIO.socketRead(Unknown Source)
    java.net.SocketInputStream.socketRead0(SocketInputStream.java:???)
    java.net.SocketInputStream.read(SocketInputStream.java:107)
    java.io.BufferedInputStream.fill(BufferedInputStream.java:189)
    java.io.BufferedInputStream.read(BufferedInputStream.java:234)
    ^-- Holding lock: java.io.BufferedInputStream@3537712[thin lock]
    weblogic.net.http.MessageHeader.isHTTP(MessageHeader.java:214)
    weblogic.net.http.MessageHeader.parseHeader(MessageHeader.java:141)
    weblogic.net.http.HttpClient.parseHTTP(HttpClient.java:473)
    ^-- Holding lock: java.io.BufferedInputStream@3537712[thin lock]
    weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:332)
    ^-- Holding lock: java.io.BufferedInputStream@3537712[thin lock]
    weblogic.net.http.SOAPHttpURLConnection.getInputStream(SOAPHttpURLConnection.java:36)
    weblogic.wsee.util.dom.DOMParser.getWebLogicDocumentImpl(DOMParser.java:92)
    weblogic.wsee.util.dom.DOMParser.getDocument(DOMParser.java:56)
    weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:311)
    weblogic.wsee.wsdl.WsdlReader.getDocument(WsdlReader.java:305)
    weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:120)
    weblogic.wsee.wsdl.WsdlSchemaImport.parse(WsdlSchemaImport.java:55)
    weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:82)
    weblogic.wsee.wsdl.WsdlSchema.parse(WsdlSchema.java:62)
    weblogic.wsee.wsdl.WsdlTypes.parse(WsdlTypes.java:145)
    weblogic.wsee.wsdl.WsdlDefinitions.parseChild(WsdlDefinitions.java:452)
    weblogic.wsee.wsdl.WsdlExtensible.parse(WsdlExtensible.java:84)
    weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:378)
    weblogic.wsee.wsdl.WsdlDefinitions.parse(WsdlDefinitions.java:358)
    weblogic.wsee.wsdl.WsdlFactory.parse(WsdlFactory.java:50)
    weblogic.wsee.jaxrpc.ServiceImpl.loadWsdlDefinition(ServiceImpl.java:437)
    weblogic.wsee.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:95)
    com.myco.regui.provisioning.client.ProvisioningAccountService_Impl.<init>(ProvisioningAccountService_Impl.java:21)
    com.myco.regui.provisioning.client.ProvisioningAccountService_Impl.<init>(ProvisioningAccountService_Impl.java:17)
    com.myco.regui.struts.accounts.AccountsForm.contactWPS(AccountsForm.java:208)
    com.myco.regui.struts.accounts.AccountsForm.validateAccountid(AccountsForm.java:161)
    com.myco.regui.struts.accounts.AccountsForm.validatePCAccountId(AccountsForm.java:144)
    com.myco.regui.struts.accounts.AccountsForm._validatePCFields(AccountsForm.java:112)
    com.myco.regui.struts.accounts.AccountsForm.validate(AccountsForm.java:83)
    org.apache.struts.chain.commands.servlet.ValidateActionForm.validate(ValidateActionForm.java:57)
    org.apache.struts.chain.commands.AbstractValidateActionForm.execute(AbstractValidateActionForm.java:94)
    org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:303)
    org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:176)
    org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:272)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1903)
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:736)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:851)
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:224)
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:108)
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:198)
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:41)
    com.myco.regui.servlets.filters.TransactionFilter.doFilter(TransactionFilter.java:23)
    .......

    You can configure these actions to occur when not all threads are stuck, but the number of stuck threads have exceeded a configured threshold:
    * Shut down the Work Manager if it has stuck threads. A Work Manager that is shut down will refuse new work and reject existing work in
    the queue by sending a rejection message. In a cluster, clustered clients will fail over to another cluster member.
    * Shut down the application if there are stuck threads in the application. The application is shutdown by bringing it into admin mode. All
    Work Managers belonging to the application are shut down, and behave as described above.
    * Mark the server instance as failed and shut it down it down if there are stuck threads in the server. In a cluster, clustered clients that
    are connected or attempting to connect will fail over to another cluster member.
    Link : [http://e-docs.bea.com/wls/docs103/config_wls/overload.html]

  • How does LabVIEW Render the data in 2D Intensity Graphs?

    Hello,
    I was hoping someone could explain to me how LabVIEW renders it's 2D intensity data. For instance, in the attachment I have included an image that I get from LabVIEW's intensity graph. The array that went into the intensity graph is 90000x896 and the width/height of the image in pixels is 1056x636.
    Something I know from zooming in on these images as well as viewing the data in other programs (e.g. Matlab) is that LabVIEW is not simply decimating the data, it is doing something more intelligent. Some of our 90000 lines have great signal to noise, but a lot of them do not. If LabVIEW was simply decimating then our image would be primarily black but instead there are very obvious features we can track.
    The reason I am asking is we are trying to do a "Live Acquistion" type program. I know that updating the intensity graph and forcing LabVIEW to choose how to render our data gives us a huge performance hit. We are already doing some processing of the data and if we can be intelligent and help LabVIEW out so that it doesn't have to figure out how to render everything and we still can get the gorgeous images that LabVIEW generates then that would be great!
    Any help would be appreciated! Thanks in advance!
    Attachments:
    Weld.jpg ‏139 KB

    Hi Cole,
    Thank you for your understanding.  I do have a few tips and tricks you may find helpful, though as I mentioned in my previous post - optimization for images or image-like data types (e.g. 2D array of numbers) may best be discussed in the Machine Vision Forum.  That forum is monitored by our vision team (this one is not) who may have more input.
    Here are some things to try:
    Try adjusting the VI's priority (File»VI Properties»Category: Execution»Change Priority to "time critical priority")
    Make sure Synchronous Display is diasbled on your indicators (right-click indicator»Advanced»Synchronous Display)
    Try some benchmarking to see where the most time is being taken in your code so you can focus on optimizing that (download evaluation of our Desktop Execution Trace Toolkit)
    Try putting an array constant into your graph and looping updates on your Front Panel as if you were viewing real-time data.  What is the performance of this?  Any better?
    The first few tips there come from some larger sets of general performance improvement tips that we have online, which are located at the following links:
    Tips and Tricks to Speed NI LabVIEW Performance
    How Can I Improve Performance in a Front Panel with Many Controls and Indicators?
    Beyond that, I'd need to take a look at your code to see if there's anything we can make changes to.  Are you able to post your VI here?
    Regards,
    Chris E.
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • How does weblogic work on JView ????

    Hi,
    The startweblogic.cmd file has options where I can use Microsoft's JVM
    for weblogic.
    But How could this be ?? because Microsoft's JVM does not support RMI
    ... but weblogic can deploy EJBs which is based on RMI ??
    Has anyone thought about this ?
    regards,
    Abhishek.

    WebLogic uses its own RMI implementation so it does not depend on the
    JVM for this.
    However, I would not recommend using Jview unless you have to do it.
    It's still a JDK 1.1 JVM.
    -- Rob
    Abhishek wrote:
    >
    Hi,
    The startweblogic.cmd file has options where I can use Microsoft's JVM
    for weblogic.
    But How could this be ?? because Microsoft's JVM does not support RMI
    ... but weblogic can deploy EJBs which is based on RMI ??
    Has anyone thought about this ?
    regards,
    Abhishek.--
    Coming Soon: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnweblogic.com

  • How does Weblogic find out which webservice method to invoke?

    Hi!
    I developed a webservice which is currently running on weblogic & everything is fine ;). Yesterday I tried to get it running on a different app server (jboss) and it simply would not work. I always got an error, that the operation requested does not exist on the endpoint. I investigated the issue & came to the conclusion that it is correct...the operation requested does really not exist. Now...why does it work on weblogic?!?
    Here a few details on the application:
    important part from the wsdl & xsds:
    <wsdl:message name="performTransactionSearch">
    <wsdl:part name="parameters" element="tns:performTransactionSearchRequest" />
    </wsdl:message>
    <wsdl:portType name="TransactionService">
    <wsdl:operation name="performTransactionSearch">
    <wsdl:input message="tns:performTransactionSearch" />
    <wsdl:output message="tns:performTransactionSearchResponse"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="O2HWOnlyJournalServicePortBinding" type="tns:O2HWOnlyJournalService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    style="document" />
    <wsdl:operation name="performTransactionSearch">
    <soap:operation soapAction="" />
    <wsdl:input>
    <soap:body use="literal" />
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal" />
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    And here the xsd type:
    <xs:element name="performTransactionSearchRequest" type="tns:performTransactionSearchRequest"/>
    <xs:element name="performTransactionSearchResponse" type="tns:performTransactionSearchResponse"/>
    <xs:complexType name="performTransactionSearchRequest">
    <xs:all>
    <xs:element name="RequestHeader" type="base:requestHeader" minOccurs="0"/>
    <xs:element name="TransactionSearchCriteria" type="wstypes:transactionSearchCriteria" minOccurs="1"/>
    </xs:all>
    </xs:complexType>
    <xs:complexType name="performTransactionSearchResponse">
    <xs:sequence>
    <xs:element name="SearchResponseItem" type="wstypes:searchResponseItem" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    Last but not least, the method:
    public List<SearchResponseItem> performTransactionSearch(RequestHeader header, TransactionSearchCriteria criteria) { ... }
    The difference in the soap request messages differs in the outer tag. Weblogic expects what is defined in the xsd -> <performTransactionSearchRequest>, whereas jboss expects the operation/method <performTransactionSearch>.
    With jboss it only works w/o the 'Request'-suffix....with Weblogic it only works with the suffix.
    In a last attempt I adjusted the xsd, and changed the name for the tag to 'performTransactionSearch'. In that case, both app servers accept the same request (the one w/o the 'Request'-suffix) & it works fine.
    Now...long story short ;) ... why is that? I understand why Jboss is not able to work with the "wrong" tag, even though it is strange that it accepts a tag that is not even defined in the xsd.
    But, at least to me, I found it even stranger, that weblogic "knows" which operation to invoke. Can anyone give a little insight how a soap message gets processed in wl & how wl finds out which operation to invoke?
    Many thanks in advance :).

    Hi
    I am seeing frequent FULL GC This is because you are creating and destroying objects VERY frequently. Try to look at your design and see where you can reuse objects (i.e. object pooling) if possible, that is if this is adversely affecting performance.
    and not able to locate
    which particular class/method is calling the
    System.gc(). Classes don't call GC. The VM handles that automagically.
    I have disabled it using
    -XX:DisableExplicitGC and performance issues have
    been resolved. Also, I noticed that it does not
    happen periodically, so it is not RMI GC. How to find
    out who exactly is doing this? Does any of of the
    profilers like Optimizeit/Jprobe help find out this.OptimizeIt will tell you everything you need to know. However, NetBeans offers a free profiler now!

  • How does Weblogic 7 check for well-formed xmls

    Hello,
    I am having trouble deploying my applications with WLS 7.0. The error I am getting
    is that my web.xml is not well-formed, but I have double-checked everything and
    I think it is correct.
    I have read that weblogic 7.00 does not deploy an application which xmls are not
    well-formed (whereas earlier versions of weblogic would do so).
    My question is: against what dtds does WLS 7 check the web.xml, the weblogic.xml
    , etc.? I would think that it would check it against the dtd in the head of the
    xnl file, i.e., http://java.sun.com/dtd/web-app_2_3.dtd for the web.xml, is this
    correct?
    If this was true, what about intranet applications that are not connected to the
    Internet? could this be the reason?
    TIA Cristina Ceballos

    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlString)));try/catch this ugly line, if no parse exception and a non -null doc exists then your XML is well-formed.
    of course if your XML contains namespaces, you would have to setup correctly the document builder.

  • Which DDL does Weblogic use?

    How does weblogic determine which DDL to use when creating JMS persistent store?

    How does weblogic determine which DDL to use when          > creating JMS persistent store?
              The DDL is stored in the weblogic.jar, and a particular DDL is chosen automically based on driver meta-data.
              Version 9.0 (out in beta), provides the option of administratively configuring the DDL file location.
              For unsupported drivers, versions prior to 9.0 require manually running a DDL file to create the JDBC store's backing tables (see JMS doc).
              Tom Barnes, BEA

  • How does one manage these new render setting for previews?

    I placed 4 HD clips from a nested into a sequence 5800 x 768 to mimic 4 side by side monitors for a multi channel video.  Each clip cut from the sequence are at 1280x720 all sitting side by side. However when I rendered the previews, they came look all squished. However when I exported the frame it looks fine in Photoshop. (I changed the uploaded image to what it looks like in Premiere in Photoshop to demonstrate the appearance in Premiere.)
    I imagine that the distortion has to do with the sequence render setting which for some reason comes out to 1918 x 253...or the pixel aspect ratio? How does one manage these new render setting for previews so it looks normal in the monitor? 
      

    Either way, I thought that this format would be a great way to view on the monitor 4 channels at the same time. I may need to place them on a “normal” 1440 x 1080 sequence in a line, bringing them down to 25% scale to make it work in the end. I did just try that. I think it will work...but when I imported and nested the old file, the scratch disks changed from the original set up on a D drive back to the main hard drive so I had to change it agin. Otherwise it works fine...so I’ll go with this for now
    These are the instructions I was given.I attched a screen save of the AE file they asked me to use (They must be on vacation, because I have not been able to get hold of them). I don't know After Effects very well:
    “As you begin creating or adapting work for e4c, you may find an After Effects template developed for this system to be helpful. Attached you'll see a zipped file with two AE templates. There is some detailed information (below) from the artist that developed these for us. In addition, a few bits of information that might help you along are:
    ·        The "Watchout"  playback system can support WMV or a QuickTime files . We like .mov files with H.264 codec best!
    ·        The end resolution of the four screens is 5120 x 720 pixels (1280x720 each).
    ·        If works are four-channel, please provide a separate audio (aiff) file so it doesn't slow any one video down.”
    Thanks for your help!

  • How does OEM monitor the weblogic domain

    Hi Guys,
    I would like to know how does the OEM monitor the weblogic domain, i.e where does the em agent (in the target host) check to determine if the weblogic domain is up or down ?
    - Does OEM fetch data regarding managed server from admin server ?
    - Does managed servers show up in OEM if the admin server console is down but the managed server is up ? (i think it does show up, even if the admin is down but then how/where does it get to know the status)
    - Is there any settings in the weblogic to be set ?
    - Does the behavior of weblogic EM console and the OEM grid console are same ?
    Basically want to understand, how and what all needs to check when the domain is showing down in OEM (when domain is up and running in weblogic console and the agent is perfectly fine)
    Similarly for the Database how does it check the status "up or down"
    - does it try to make a connection to the db ?
    - if so where do we give the details for the db connection user and password ?
    Please help me in understanding these.
    Thanks and Regards,
    Harish

    If the targets are actually up and showing down in OEM console , so it means something wrong with the configuration .
    Can you check the error message in the console , why it is down ? Or you can also check agent logs on the target server.
    To monitor the weblogic , it uses username used during the configuration.
    Please check the picture at below link :
    Discovering Middleware Targets
    Enter the WebLogic Administration Server user name and password.If you want to discover the target only for monitoring purposes, then it is sufficient to provide a user name that has a monitoring role. If you want to monitor the target and also perform start/stop operations, then ensure that you provide a user name that has either an operator role or an administrator role.Note: There is the potential of account locking issues if you enter the default WebLogic user name, and the account password is changed without updating the Enterprise Manager monitoring credentials for the Domain and Farm.
    Thanks
    Rajesh

  • How to call a shell script from a java code

    Hello can any one suggest me how to call a shell script from a java program that takes three parameters.
    i have a shell script (msp_restore_gui) when i run this script in the command line in a RHEL5 ,SUSE10 and Debian machine it works fine .I even tested to call it from a java program and it also worked fine but when i used the same in a J2ee application where the user when clicks the restore button in a webserver this inturn sends the request to a java file named BackupManager.java where i call the shell script.But here it fails.Waiting for your suggestions.If you want i can put the code also here

    yes the script is in /usr/local/mss/tools/backup and the script (msp_restore_gui) is as follows
    #!/bin/sh
    TIMESTAMP=`date +%d_%b_%y-%H-%M`
    touch /var/backups/mss/mss_restore_"$TIMESTAMP".log
    LOGFILE="/var/backups/mss/mss_restore_"$TIMESTAMP".log"
    ### Explode tgz file
    cd /
    # Checks to be done:
    # root login
    # assume he passes the parameter as msp_backup_<timestamp>
    # check for the existence of the .tz and fileList.txt
    # Checking for the root login and if not logged on as root
    # permission will be denied to execute this script
    logmsg(){
    echo "`date`: $*" >> $LOGFILE 2>&1
    echo "$*"
    #usage of this script
    while [ $#  -ne 0 ]
    do
    case $1 in
    -n)
    shift
    ARCHIVE_NAME=`find / \( -name "$1.tz" -o -name "$1.tgz" \) 2>/dev/null`
    FILE_NAME=`find / -name $1_filesList.txt 2>/dev/null`
    if [ x$ARCHIVE_NAME = x -a y$FILE_NAME = y ]
    then
    logmsg "ERROR: Files not found, Restore cannot proceed"
    usage
    else
    tar tvzf $ARCHIVE_NAME > /dev/null 2>&1
    if [ $? -ne 0 ]
    then
    echo "ERROR: The tar file $ARCHIVE_NAME is not proper. Restore cannot proceed"
    exit 1
    else
              echo "Backedup files are present, proceeding with restore......" >> $LOGFILE 2>&1
    fi
    fi
    usage
    SKIP_CLEANUP=1
    STATUS=1
    exit
    esac
    shift
    done
    rm -rf ./newfile
    curr_ver_file="/usr/local/mss/etc/version"
    /usr/local/mss/tools/backup/check_version $curr_ver_file $FILE_NAME
    ret_code=$?
    echo "Exit value of check_version is $ret_code"
    if [ "$ret_code" != 0 ]
    then
    logmsg "MSP Version not matching. Exiting from restore now...."
    errormsg=`cat /usr/local/mss/temp/ver_err_mesg`
    logmsg $errormsg
    rm -f /usr/local/mss/temp/ver_err_mesg
    exit 1
    else
    echo "Version check is successful"
    fi
    #### ShutDown MSS########
    /etc/init.d/mss stop
    sleep 2
    ### Shutdown semm
    /etc/init.d/semm stop
    sleep 2
    rm -rf `grep -v "MSP Version:" $FILE_NAME`
    logmsg "MSP restore in progress......"
    tar mxvfz $ARCHIVE_NAME >> $LOGFILE
    sleep 5
    ### Call mysql restore script
    /usr/local/mss/bin/mysql_alldb_restore.sh >> $LOGFILE 2>&1
    if [ $? -ne 0 ]; then
    logmsg "Database restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "Database restore Succeeded."
    fi
    ### Remove DB Dump Files
    rm -f /var/lib/mysql-dumps/*
    ### Trigger cleanup of airprism database tables
    #touch /usr/local/mss/airprism/server/config/reinitdb
    ### Trigger re-import of software packages
    touch /usr/local/mss/swdepot/reimport
    ### Remove log files under the "apps" directory
    find /usr/local/mss/apps -name '*.log*' | xargs rm -f
    find /usr/local/mss/logs -follow -name '*[._]log*' | xargs rm -f
    if [ $? -ne 0 ]; then
    logmsg "MSP restore Failed. Cannot proceed further"
    exit 1 ;
    else
    logmsg "MSP restore Succeeded."
    fi
    # reinstall_patch is touched so that patches are re-installed after restoring of MSP.
    touch /usr/local/mss/patch/bin/reinstall_patch
    ##### Start MSS
    logmsg "restarting MSP server "
    /etc/init.d/mss start
    sleep 5
    ### Start semm
    /etc/init.d/semm start
    sleep 5
    logmsg "MSP server is now restarted"
    my jsp page backup.jsp is as follows
    <%@taglib uri="portlet.tld" prefix="uif" %>
    <%@taglib uri="msp-console.tld" prefix="msp" %>
    <uif:defineObjects/>
    <%@page import="javax.portlet.*" %>
    <%@ page import="java.util.Date" %>
    <%@ page import="java.util.Vector" %>
    <%@ page import="java.text.DateFormat" %>
    <%@ page import="com.symbol.mss.console.admin.backup.BackupManager" %>
    <%@ page import="com.symbol.mss.console.admin.system.SystemInfoPortlet" %>
    <%
         String STYLE_NAME = request.getParameter("style");
         if (STYLE_NAME == null) STYLE_NAME = STYLE_DEFAULT;
         final String ua = request.getHeader("User-Agent");
         BackupManager helper = null;
         PortletSession portletSession = renderRequest.getPortletSession();
         helper = (BackupManager)portletSession.getAttribute("helper");
         if (helper == null) {
              //System.err.println("Created new BackupManager");
              helper = new BackupManager();
              portletSession.setAttribute("helper", helper);
         final BackupManager backupManager = helper;
         String action = "";
         final String backupName = renderRequest.getParameter("backupName");
         String completePath = backupManager.getBackupDir() + backupName + backupManager.getBackupFileExt();
         if (backupName != null) {
              action = "backup";
         if(backupManager.backup(backupName)) {
              SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "backuperror";          
         final String cmd = renderRequest.getParameter("submitButton");
    final String selectedBackup = renderRequest.getParameter("selectedBackup");
    int tarFileStatus =0;
    String backupTarFile ="";
    String backupFileList ="";
         if ("Restore".equals(cmd)) {
    if (selectedBackup != null) {
         tarFileStatus = backupManager.verifyTarFile(selectedBackup);
         //backupTarFile = backupManager.getRestoreFile(Integer.parseInt(selectedBackup));
         //backupFileList = backupTarFile.substring(0, backupTarFile.lastIndexOf(backupManager.getBackupFileExt()))+"_filesList.txt";
                   if (tarFileStatus == 0){
         action = "restore";
         backupManager.restore(selectedBackup);
                        SystemInfoPortlet.beginRestartMSP();
              } else {
                   action = "error";
    } else if ("Remove".equals(cmd)) {
    backupManager.remove(Integer.parseInt(selectedBackup));
         DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
         PortletURL restoreURL = renderResponse.createActionURL();
    %>
    <%@ include file="/jsp/core/constants.jspf" %>
    <% if (action.length() > 0) {
         if ("backup".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to create the <%=backupName %> backup file,
              and will automatically restart as soon as the file has been created.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>
         <p>The full pathname for the backup file is: <%=completePath %></p>     
    <%     }
         else if ("restore".equals(action))
    %>
         <p>The MSP Appliance has been shut down in order to restore from the <%=backupTarFile%> backup file,
              and will automatically restart as soon as the restore is complete.
              To continue your work, please log out of the MSP Console, wait for the appliance
              to restart, and then log back in. The amount of time you'll have to wait for the
              MSP Appliance to come back online depends on the amount of information you have
              stored in the MSP Database.</p>     
    <%     } else if ("backuperror".equals(action)) { %>
              <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> Errors occurred while taking back up of MSP. Please see the backup service log file for more details.
              </P>
    <%     } else if ("error".equals(action)) {
              if (tarFileStatus == 4) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors. This backup can't be restored. Please restore a valid back up.
                   </P>
              <%} else if (tarFileStatus == 3) { %>
                   <p><img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file list <%=backupFileList %> is missing. This file is required to restoring backup. Please get the backup file list and proceed with restoring backup.</p>
              <%} else if (tarFileStatus == 2) { %>
                   <p> <img src="images/dialogue/error_16.gif" class="icon" alt="Notify" /> The backup file <%=backupTarFile%> contains errors and the backup file list <%=backupFileList%> is missing. This backup can't be restored. </p>
              <%} %>
    <%     }
    } else { %>
    <p><strong>Note</strong>: Both backup and restore will shut down MSP temporarily. MSP will be unable to collect data from devices, send notifications, or provide MSP Console access during this time. When the backup or restore operation is complete, MSP will come back online automatically.</p>
    <h3>Backup</h3>
    <form action="<%= restoreURL.toString() %>" method="post">
    <p>Please provide a name for your backup. MSP will provide the date automatically in the list of backups.</p>
    <p><label for="<uif:namespace />backupName">Name</label> <input type="text" name="<uif:namespace />backupName" id="<uif:namespace />backupName" size="20" maxlength="256" /> <input type="submit" name="<uif:namespace />submitButton" value="Back up now" onclick="return <uif:namespace/>validateName()"/></p>
    </form>
    <h3>Restore</h3>
    <p>This will restore all databases (device assets, collected device data, software packages, policies, etc.) to their state as of the time the backup was made. Changes since then <em>except for backups</em> will be destroyed.</p>
    <%
    Vector restoreList = helper.getRestoreEntries();
    Vector restoreDates = helper.getRestoreDates();
    Vector restoreVersions = helper.getRestoreVersions();
    Vector filesStatus = helper.getBackupFilesStatus();
    %>
    <% if (restoreList.size() == 0) { %>
    <p>There are no backups currently available.</p>
    <% } else { %>
    <form action="<%= restoreURL.toString() %>" method="post">
    <table class="input-radios" id="<uif:namespace />existingBackups">
    <thead>
    <tr>
    <th></th>
    <th>Name</th>
    <th>Date</th>
    <th>MSP Version</th>
    <th>Remarks </th>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td colspan="4" class="actionsOnSelected">
    <input type="submit" name="<uif:namespace />submitButton" value="Restore" onclick="return confirm('This action requires MSP and all related services to be shut down. Console will be unavailable if the request is submitted. The server will restart automatically once restore has been completed.');" />
    <input type="submit" name="<uif:namespace />submitButton" value="Remove" onclick="return confirm('This action will remove the backup archive. You will no longer be able to restore this backup. Continue?');" />
    </td>
    </tr>
    </tfoot>
    <tbody><%-- First one (most recent) is checked by default. Every other row has class="portlet-section-alternate". Note that each ID must be unique and must match the value of the "for" attribute on the corresponding "label" element. --%>
    <%
    for (int i = 0; i < restoreList.size(); i++) {
    %>
    <tr <%= (i % 2 == 1) ? " class=\"portlet-section-alternate\"" : "" %>>
    <td><input type="radio" name="<uif:namespace />selectedBackup" value="<%= i %>" id="<uif:namespace />selectedBackup-<%= i %>" <%= (i == 0) ? "checked=\"checked\"" : "" %> /></td>
    <td><label for="<uif:namespace />selectedBackup-<%= i %>"><%= restoreList.elementAt(i) %></label></td>
    <td><%= dateFormat.format((Date)restoreDates.elementAt(i)) %></td>
    <td><%= restoreVersions.elementAt(i) %></td>
    <td><%= filesStatus.elementAt(i) %></td>
    </tr>
    <%
    %>
    </tbody>
    </table>
    </form>
    <% } %>
    <% } %>
    <script type="text/javascript">
    <!--//--><![CDATA[//><!--
    function <uif:namespace/>validateName() {
    var name =document.getElementById("<uif:namespace />backupName");
    var msg= "<msp:i18n key="BackupMsg"/>";
    var str=name.value;
    var re = /^[A-Za-z0-9_]+$/;
    if (!str.match(re)) {
         alert(msg);
         name.focus();
         return false;
         } else {
    return confirm('This action requires MSP and all related services to be shutdown. Console will be unavailable if the request is submitted. The server will restart automatically once backup has been completed.');
    //--><!]]>
    </script>
    and my BackupManager.java is as follows where the code in bold and italic is called the restore()
    //============================================================================
    // Symbol Technologies P R O P R I E T A R Y S O U R C E C O D E
    // C O N F I D E N T I A L
    // Copyright (c) 2003 Symbol Technologies. All Rights Reserved.
    // All information contained herein is the property of Symbol Technologies,
    // or its Licensors, and are protected copyrights and trade secrets, and may
    // be covered by U.S. patents. Any reproduction or dissemination of any
    // portion of this document, of the software, or other works derived from it
    // is strictly forbidden unless prior written permission is obtained from
    // Symbol Technologies.
    //============================================================================
    package com.symbol.mss.sdf.services.backup;
    import java.io.*;
    import java.sql.Time;
    import java.text.DateFormat;
    import java.util.logging.FileHandler;
    import java.util.logging.Formatter;
    import java.util.logging.LogRecord;
    import java.lang.Process;
    import java.util.*;
    import org.apache.avalon.framework.configuration.Configurable;
    import org.apache.avalon.framework.configuration.Configuration;
    import org.apache.avalon.framework.configuration.ConfigurationException;
    import org.apache.avalon.framework.logger.LogEnabled;
    import org.apache.avalon.framework.logger.Logger;
    import com.symbol.mss.sdf.admin.AdministratorService;
    import com.symbol.mss.sdf.backup.*;
    import com.symbol.mss.sdf.data.*;
    * @author nramaiah
    * Service to perform scheduled backups of the system state.
    public class BackupManager implements BackupService, DataHandler,
    LogEnabled, Configurable {
    // MSS Home Path
    private static String mssHome = System.getProperty("phoenix.home", File.separator + "usr" +
    File.separator + "local" +
    File.separator + "mss" +
    File.separator);
    // Backup related definitions
    private static final String BACKUP_LIST_FILE_NAME = "conf" + File.separator + "files_to_backup.txt";
    private static final String BACKED_UP_LIST_FILE_NAME_SUFFIX = "_filesList.txt";
    private static final String BACKUP_LOCATION = File.separator + "var" + File.separator + "lib" +
    File.separator + "mss-backups" + File.separator;
    private static final String BACKUP_PARTITION = File.separator + "var" + File.separator + "lib";
    private static final String VERIFY_BACKUP = File.separator + "usr" + File.separator + "local" +
                                                           File.separator + "mss" + File.separator+"tools"+
                                                           File.separator+"backup"+File.separator+"verifyBackup.sh";
    // DB backup/restore related definitions
    private static final String DB_DUMP_LOCATION = File.separator + "var" + File.separator +
    "lib" + File.separator +
    "mysql-dumps" + File.separator;
    private static final String DB_BACKUP_SCRIPT = "bin" + File.separator + "mysql_alldb_backup.sh";
    private static final String DB_RESTORE_SCRIPT = "bin" + File.separator + "mysql_alldb_restore.sh";
    // Private variables
    private AdministratorService m_admin = null;
    private Logger m_logger = null;
    private String backupLocation = null;
    private String backupListFileName = null;
    private String backupPartition = null;
    private int backupPartitionLimit = 90;
    private String dbDumpLocation = null;
    private String dbBackupScript = null;
    private String dbRestoreScript = null;
    private List servicesBackupList = null;
    private String tarFileExtension =".tgz";
    private String errFileExtension =".err";
    private int exitValue=0;
    * Default Constructor
    public BackupManager() {
    servicesBackupList = new ArrayList();
    * Set the administrator service implementation. Link established by Broker service.
    * @param admin reference to an implementation of AdministratorService
    public void setAdministrator(AdministratorService admin) {
    m_admin = admin;
    * Set the job publisher service implementation. Link established by Broker service.
    * @param jobPublisher reference to an implementation of JobPublisherService
    public void setJobPublisher(DataChannel jobPublisher) {
    jobPublisher.subscribe(this);
    * Gets the backup manager object.
    * @return backup manager object
    public BackupService getBackupService() {
    return this;
    * Service lifecycle method.
    * @param logger logger object to be used by the service
    public void enableLogging(Logger logger) {
    m_logger = logger;
    * Service lifecycle method.
    * @param configuration service configuration object
    public void configure(Configuration configuration) throws ConfigurationException {
    // Verify MSS Home path
    if (!mssHome.endsWith(File.separator))
    mssHome += File.separator;
    // Get the location where the backup file needs to be placed
    backupLocation = configuration.getChild("BackupLocation").getValue(BACKUP_LOCATION);
    // Verify backup directory path
    if (!backupLocation.startsWith(File.separator))
    backupLocation = mssHome + backupLocation;
    if (!backupLocation.endsWith(File.separator))
    backupLocation += File.separator;
    // Get the file listing the files/directories to be backed up
    backupListFileName = configuration.getChild("FilesList").getValue(BACKUP_LIST_FILE_NAME);
    // Verify backup list file name path
    if (!backupListFileName.startsWith(File.separator))
    backupListFileName = mssHome + backupListFileName;
    // Get the partition where the backups are kept
    backupPartition = configuration.getChild("BackupPartition").getValue(BACKUP_PARTITION);
    // Verify backup partition path
    if (!backupPartition.startsWith(File.separator))
    backupPartition = File.separator + backupPartition;
    if (backupPartition.endsWith(File.separator))
    backupPartition = backupPartition.substring(0, (backupPartition.length()-1));
    // Get the limit on the amount of free space on the backup partition
    backupPartitionLimit = configuration.getChild("BackupPartitionLimit").getValueAsInteger(backupPartitionLimit);
    // Get the location where the DB dump files will be placed
    dbDumpLocation = configuration.getChild("DBDumpLocation").getValue(DB_DUMP_LOCATION);
    // Verify DB dump directory path
    if (!dbDumpLocation.startsWith(File.separator))
    dbDumpLocation = mssHome + dbDumpLocation;
    if (!dbDumpLocation.endsWith(File.separator))
    dbDumpLocation += File.separator;
    // Get the name of DB dump backup script
    dbBackupScript = configuration.getChild("DBBackupScript").getValue(DB_BACKUP_SCRIPT);
    // Verify backup script path
    if (!dbBackupScript.startsWith(File.separator))
    dbBackupScript = mssHome + dbBackupScript;
    // Get the name of DB dump restore script
    dbRestoreScript = configuration.getChild("DBRestoreScript").getValue(DB_RESTORE_SCRIPT);
    // Verify restore script path
    if (!dbRestoreScript.startsWith(File.separator))
    dbRestoreScript = mssHome + dbRestoreScript;
    * Individual services can supply a list of files/directories to be backed up.
    * These are files apart from the files specified in conf/files_to_backup.txt and
    * will be backed up as well.
    * @param files list of files/directories
    public void filesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list contents to the current backup list
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    servicesBackupList.add(tStr);
    else
    servicesBackupList.add(mssHome + tStr);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Individual services can supply a list of files/directories to be backed up.
    * Specified files will be added to the file defining the list of files to be backed up.
    * @param files list of files/directories
    private void persistFilesToBackup(List files) {
    synchronized(this) {
    if (files != null) {
    if (files.size() > 0) {
    // Add the list of files provided to the end of file
    try {
    File file = new File(backupListFileName);
    if ((file == null) || (!file.exists()))
    file.createNewFile();
    // Seek to the end of the file
    RandomAccessFile rFile = new RandomAccessFile(file, "rw");
    if (rFile != null) {
    rFile.seek(rFile.length());
    // Write the list contents to the file
    for (int i=0; i<files.size(); i++) {
    String tStr = (String)files.get(i);
    // Check for absolute or relative path
    if (tStr.startsWith(File.separator))
    rFile.writeBytes(tStr + "\n");
    else
    rFile.writeBytes(mssHome + tStr + "\n");
    else
    m_logger.error("Error opening file " + backupListFileName);
    rFile.close();
    catch (Exception ex) {
    ex.printStackTrace();
    m_logger.error("Error adding entries to file " + backupListFileName, ex);
    else
    m_logger.info("Empty list of filenames. Nothing added.");
    else
    m_logger.info("Null list of filenames. Nothing added.");
    * Command to be run during the backup process. Individual services can
    * provide shell commands that will be executed before backing up the files.
    * @param command shell command to be executed
    private void runCommand(String command) {
    * Creates a shell script at the specified location that will backup the
    * files listed in the List passed in.
    * @param scriptFileName location where the script needs to be created
    * @param backupFileName name for the tar file being created
    * @param backupList list of files to be backed up
    private void createBackupScript(String scriptFileName, String backupFileName, ArrayList backupList) throws Exception {
    // Create a new StringBuffer to build the contents to be written to the script file
    StringBuffer buffer = new StringBuffer();
    // Add the initial comment in the start script
    buffer.append("#!/bin/sh\n" + "set -x\n\n");
    // Check if the partition has enough space
    buffer.append("### Check if the partition has enough space\n" +
    // "diskUsed=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
                   " diskUsed=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +     
    "echo \"Partition " + backupPartition + " is $diskUsed% used.\"\n" +
    "if [ \"$diskUsed\" -lt \"" + backupPartitionLimit + "\" ]\nthen\n" +
    " echo \"Starting backup...\"\n\n");
    // Shutdown semmd
    buffer.append(" ### Shutdown semm\n" + " /etc/init.d/semm stop\n" +
    " sleep 2\n\n");
    // MSP Limited release and earlier builds stop mysql DB and backup the
    // /var/lib/mysql directory as it is. Starting MSP 1.0 GA release, mysql
    // dump script will be integrated which will create sql scripts to
    // restore the database.
    // Check if mysql dump creation script exists
    File mysqlDumpScript = new File(dbBackupScript);
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Run the script that will generate sql scripts that would re-create the DB as it is
    buffer.append(" ### Call mysql dump script\n" +
    " " + dbBackupScript + "\n\n");
    else {
    // MSP Limited release
    // Add command to shutdown mysql
    buffer.append(" ### Shutdown mysql\n" + " /etc/init.d/mysql stop\n\n");
    // Change to root directory and create the tgz file
    buffer.append(" ### Create tgz file\n" + " cd /\n");
    // Build up the tar file name from the current date and time
    String fileName = null;
    if ((backupFileName != null) && (backupFileName.length() > 0))
    fileName = backupFileName;
    else {
    // File name not provided by user, build one using the timestamp
    Calendar cal = Calendar.getInstance();
    Date date = cal.getTime();
    fileName = "MSS-"
    + DateFormat.getDateInstance().format(date).replaceAll(" ", "").replaceAll(",", "")+ "-"
    + (new Time(cal.getTimeInMillis())).toString().replaceAll(":", "").substring(0,4);
    String tarFileName = fileName + ".tgz";
    // Get the current MSP Version
    String mspVersion = getMSPVersion();
    // Gather all the files to be backed up. Add them to the tar command and
    // also dump them into the file maintaining the list of files being backed up
    String listStr = "";
    for (int i=0; i<backupList.size(); i++)
    listStr += (String)backupList.get(i) + "\n";
    // Dump the current MSP version and the list of files being backed up into a manifest file
    String listFileName = fileName + BACKED_UP_LIST_FILE_NAME_SUFFIX;
    RandomAccessFile file = new RandomAccessFile(backupLocation + listFileName, "rw");
    m_logger.info("List of files/directories being backed up:\n" + listStr);
    file.writeBytes("### MSP Version: " + mspVersion + " ###\n");
    file.writeBytes(listStr);
    file.close();
    // Add the tar command to the script
    buffer.append(" echo \"Creating " + backupLocation + tarFileName + "...\"\n" +
    " tar cvhfz " + backupLocation + tarFileName + " `grep -v \"MSP Version:\" " +
    backupLocation + listFileName + "`\n\n");
    // Check if free space on the backup partition has reduced below the limit
    // If enough space left, backup is retained, "mss" is made the owner of the files,
    // "backup" is made the group the files belong to,
    // permissions changed to be "0660" and
    // backup action declared a success
    // Else, backup files are deleted and declared a failure
    buffer.append(" ### Check if the partition has enough space left\n" +
    //" diskLeft=`df -k | grep \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1`\n" +
    " diskLeft=`df -k \"" + backupPartition + "\" | awk '{print $5}' | cut -d\"%\" -f1 | grep -v Use`\n" +
    " echo \"Partition " + backupPartition + " is $diskLeft% used.\"\n" +
    " if [ \"$diskLeft\" -gt \"" + backupPartitionLimit + "\" ]\n" +
    " then\n" +
    " ### Failure\n" +
    " echo \"Partition " + backupPartition + " does not have enough space.\"\n" +
    " echo \"Backup " + backupLocation + tarFileName + " will be removed.\"\n" +
    " rm -f " + backupLocation + fileName + "*\n" +
    " echo \"Backup Failed.\"\n" +
    " else\n" +
                        " tar tvzf " + backupLocation + tarFileName + " > /dev/null 2>&1\n" +
    " if [ ! -s " + backupLocation + tarFileName + " -o $? -ne 0 ] \n" +
                        " then\n" +
                        " echo \"MSP Backup operation is not successful. The tar file " + backupLocation + tarFileName + " contains errors.\"\n" +
                        " echo \"Please take the backup again\"\n" +
                        "     touch "+backupLocation+fileName+".err\n" +
    " else \n" +
    " ### Success\n" +
    " ### Change the owner, group and permissions for the backup files\n" +
    " chown mss " + backupLocation + fileName + "*\n" +
    " chgrp backup " + backupLocation + fileName + "*\n" +
    " chmod 0660 " + backupLocation + fileName + "*\n" +
    " echo \"Backup Completed.\"\n" +
    " fi\n" +
    " fi\n\n");
    // MSP Limited release and earlier builds re-start mysql. Starting
    // MSP 1.0 GA release, mysql is not stopped and so re-start is not
    // needed. sql scripts created by the dump script get packed into
    // the tar file and so are deleted.
    // Check if mysql dump creation script exists
    if (mysqlDumpScript.exists()) {
    // MSP 1.0 GA and later releases
    // Remove DB dump files
    buffer.append(" ### Remove DB Dump Files\n" + " rm -f " + dbDumpLocation + "*\n\n");
    else {
    // MSP Limited release
    // Start mysql
    buffer.append(" ### Start mysql\n" + " /etc/init

Maybe you are looking for

  • HT204302 how can i gift an ipod touch app to a friend from windows xp?

    I do not own an ipod touch, but have used itunes for years with my 2gb 2nd gen. nano.  I would like to purchase an application on itunes called soundprism pro for a friend as a gift.  Is it possible to gift the app to my friend with my itunes account

  • Report containing bar chart

    I am new to charts in crystal reports. In my database i am having 200 students. In that i have one coloumn which is containing the ranks of student (1,2,3,..). In the report , i need to display, 1) X-axis ->ranks should be dispalyed (1,2,3,4,5) 2) Y-

  • Nano wont come up on itunes

    i read and reread did it all now it wont come up on itunes my ipod when i plug it in this is a constant problem does anyone want to buy my nano? does anyone want to sue apple with me? anyone got any answer beside what apple says to do i have updated

  • ETL failure relating to SDE_ORA_PersistedStage_WorkforceEvent_Salary_Full

    Hi everyone, I am getting error at ETL failure relating to SDE_ORA_PersistedStage_WorkforceEvent_Salary_Full READER_1_1_1> RR_4035 SQL Error [ ORA-00907: missing right parenthesis Database driver error... Function Name : Execute SQL Stmt : SELECT ass

  • After transparency reduction in preflight text jumps

    Dear All, we are using the adobe acrobat transparency reduction in a preflight. Now we noticed ocasionly we have the problem that Text is Jumping like this: After a few tests i found out that this comes from the transparency reduction (same when usin