Executor vs Thread for creating a new thread

Hello,
It's a little question :
which is the best or most preferable way to create a new Thread?
Thread t = new Thread(this);
t.start();or using the Executor class ?
Executor.execute(Runnable r)
new Thread(r)).start();Thanks in advance!

Hi Kolarius,
If you only have one thread to run, the first solution is sufficient as long as you need the runnable executed by the thread being the caller of the thread itself.
In the second example, you start a new thread apart from the caller. You can have the same result without using an executor.

Similar Messages

  • How can i delete my old account, for create a new one?

    i need to delete my old account for create a new one bicouse i arrived to the limiterd creation of ID account apple (5 TIME) with the seme payment card.the proublem is tht i don't now what ID account i have and wat i need to deleted so i need to find it first an the deleted.

    You can access www.appleid.apple.com and open your old account and delete.

  • HOW TO KNOW THE TCODE FOR CREATING A NEW ENTRY IN A PARTICULAR TABLE

    HI,
        CAN YOU PLEASE LET ME KNOW THE PROCEDURE TO GET THE TCODE FOR CREATING A NEW ENTITY IN A TABLE .
       EG: IS THERE ANY PROCEDURE TO KNOW THAT IF I CREATE A NEW ENTITY IN MM01 IT WILL BE STORED IN TABLE MARA.
    THANKING YOU.

    Hi Venkata,
    If you want to know, for a given table, which transaction/program(s) will create a new record,  there is no easy procedure, other than to refer to experts who deal with these programs.
    It is possible to get a list of programs that refer to a table.  SE11, select the table, select the 'where-used' icon, select programs, execute.  You will be presented with a list of programs that read or write to that table.  From that list you would have to determine which one(s) create records, using your ABAP skills.  From those selected programs you would have to find which, if any, had a transaction assigned.
    Many tables are updated by more than one program/transaction.  Many other tables are not updated by ANY interactive transaction.
    If you ever decide to go ahead with this research, make sure you publish it.  You could probably make yourself a bit of money.
    Regards,
    DB49

  • I bought a new iMac.  iWeb and all folders migrated over, no problem, but I cannot bring up my website - it only seems to allow for creating a new site.

    I bought a new iMac.  iWeb and all its folders migrated over, no problem, but I cannot bring up my website - it only seems to allow for creating a new site.

    You need the 'Domain' file in which iWeb keeps its data. This lives by default in (user)/Library/Application Support/iWeb. You need to locate it on the old machine and copy it to the same position in the new machine. Note that it is the Library folder in your Home folder, not the one at root level.
    This folder is hidden on Lion and above; to access it, in the Finder go to the ‘Go’ menu and hold down the Option (Alt) key; the Library folder will appear as a choice. In Mavericks you can make it permanently visible - open your Home Folder the from the Finder's View menu, choose show View Options and check Show User Library.

  • Ant task for creating a new weblogic domain in weblogic 10.3

    Hi,
    Can anybody help me in writing an ant task in build.xml for creating a new weblogic domain in weblogic 10.3, like as in <target name="new-domain">
         <echo message=""/>
         <echo message="Attempting to create new domain:"/>
         <delete dir="C:\bea\user_projects\domains" />
         <mkdir dir="C:\bea\user_projects\domains"/>
         <wlserver dir="C:\bea\user_projects\domains" domainname="mydomain"
         host="127.0.0.1" port="7001"
         generateConfig="true" servername="AdminServer" username="weblogic"
         password="weblogic" action="start"/>
         </target>
    Please suggest me adding something to the above in order to create the domain successfully.

    Hi,
    Can anybody help me in writing an ant task in build.xml for creating a new weblogic domain in weblogic 10.3, like as in <target name="new-domain">
         <echo message=""/>
         <echo message="Attempting to create new domain:"/>
         <delete dir="C:\bea\user_projects\domains" />
         <mkdir dir="C:\bea\user_projects\domains"/>
         <wlserver dir="C:\bea\user_projects\domains" domainname="mydomain"
         host="127.0.0.1" port="7001"
         generateConfig="true" servername="AdminServer" username="weblogic"
         password="weblogic" action="start"/>
         </target>
    Please suggest me adding something to the above in order to create the domain successfully.

  • Standard process for creating a new version of an existing report

    Hi All,
    We are using Siebel 8.1 with BI Publisher.
    Does any one know the standard process for creating a new version of an existing report - ie if 'BIP Report XXX' is created and works correctly from the siebel view but then an enhancement is developed, how is the enhancement deployed so that the new version completely replaces the old?
    One suggestion was:
    You can upload a new version of an existing report. You have to navigate to Administration - BIP > Report Template Registration... search for the report you need to replace (I would say that the new rtf file need to have the same name). Now you have to go to the "Template" column where there is the reference to the report file already uploaded but you don't have to click on the link that is displayed you have to click near the link in order to place the cursor on the field then you will be able to see the Multi Value Grup icon .. you click on it and you will be able to upload a new file.
    We have tested this process today, however it is not effective in replacing the old version of the report.
    After carrying out this process (including related steps from bookshelf - ie "click upload files"), we can generate the report from the relevant siebel view and the previous version of the report is still generated.
    Is there a standard process for replacing an existing report that is effective?
    Thanks.

    Hi ,
    This currently seems like a bug , we have encountered this too.
    work around is you have to delete the rtf files from server Siebel\client\temp\XMLP directory and upload them again so that they are not cached any more.
    same on dedicated client you may have to delete relavant files form siebel\client\temp\xmlp directory and upload again.
    Thanks,
    Vamsi

  • Steps for creating a new BAPI function module

    Hello experts,
    Can any one send me steps for creating a new BAPI function module , I got a requirement to do like this,but I dont have any clue about how to create.
    Please help !!!

    BAPI stands for Business Application Programming Interface.
    There are 5 different steps in BAPI.
    - Create BAPI Structure  
    - Create BAPI Function Module or API Method.  
    - Create BAPI object  
    - Release BAPI Function Module.  
    - Release BAPI object.
    Step1. Creating BAPI Structure:  
    - Go to <SE11>. 
    - Select Data Type & Enter a name. 
    - Click on Create.
    - Note: Always BAPI should be in a development class with request number (Not Local Object).
    - Select Structure & hit ENTER.
    - Enter the fields from your database. Make sure that the first field is the Primary Key Field.
    - Then SAVE & ACTIVATE.
    Step 2. Creating BAPI module: 
    - Enter TR.CODE <SE37>.
    - Before entering any thing, from the present screen that you are in, select the menu
       Goto -> Function Groups -> Create Group.
       Enter a name (Note: This name Must start with ZBAPI)
       Let this screen be as it is and open another window and there, enter TR.CODE <SE80).
       Click on the Third ICON that says Inactive Objects. 
       Select the group that you just created and click on Activate. 
       Notice that the group you created will disappear from the list of inactive objects.
    - Go back to <SE37> screen and enter a name and hit <ENTER>. Then enter the group name that you just created and activated.
    NOTE: When you release a function module the respective group will be attached to that particular application. It cannot be used for any other application. NEVER include an already existing group that is attached to another module.
    Now click on the first Tab that says [ATTRIBUTES] and select the radio button that says remote-enabled module since we will be accessing this from any external system.
    Then click on the second tab that says [IMPORT].
    Enter a PARAMETER NAME, TYPE and the structure you created in the first step. Also select the check box ‘Pa’. All remotely enabled functional modules MUST be Pa enabled, where Pa means ‘Passed by Value’ and if you don’t select ‘Pa’, then that means it will be passed by reference..
    Then click on tab that says [EXPORT].
    Enter the following as is in the first three fields 
      RETURN        TYPE        BAPIRETURN (These 3 field values are always same)
      Here also select ‘Pa’ meaning Pass by value.
    Note: BAPIRETURN contains structure with message fields.
    Then SAVE and ACTIVATE.
    Step 3. Creating BAPI object: 
    - Enter Tr.Code <SWO1>   (Note. It is letter ‘O’ and not Zero).
    - Enter a name and then click on create. Enter details. 
    NOTE: Make sure that that Object Type and Program name are SAME.   
    - Enter Application ‘M’, if you are using standard table Mara. If you are using your own database then select ‘Z’ at the bottom. 
    - Then hit <ENTER>. 
    - Now we have to add ‘Methods’. High light METHODS and then select the following from the menu: 
    Goto Utilities -> API Methods -> Add Methods.
    - Enter function Module name and hit <ENTER>.
    - Select the second FORWARD ARROW button (>)to go to next step. 
    - Check if every thing looks ok and again click on FORWARD ARROW button (>).
    - Then select ‘YES’ and click on <SAVE>.
    -  Now on a different screen goto TR.CODE <SE37>.  Enter Function Module name and select from the top menu  Function Module -> Release -> Release.
    - Goback to TR.CODE <SWO1>.
    Here select the menu combination shown below in the same order.
    - Edit -> Change Release Status -> Object Type Component -> To Implemented.
    - Edit -> Change Release Status -> Object Type Component -> To Released.
    - Edit -> Change Release Status -> Object Type -> To Implemented.
    - Edit -> Change Release Status -> Object Type -> To Released.
    - Then click on <SAVE>.
    - Then click on Generate Button (4th button from left hand side looks like spinning wheel).
    - Then Click on the button that says ‘PROGRAM’ to see the source code.
    To check if this is present in work flow goto TR.CODE <BAPI>. 
    Here it shows business object repository.
    - First click on the middle button and then select “ALL” and hit ENTER.
    - Goto tab [ALPHABETICAL] and look for the object that you created. This shows that the BAPI object has been created successfully.
    regards,
    aswin

  • Error in writing an Ant task for creating a new connection pool.

    I have written the following ant task to create a new connection pool in weblogic 10.3.
    <target name="pool.dev">
         <wlconfig url="http://localhost:7001/" username="weblogic" password="weblogic">
         <query domain="C:/weblogic/rtg-L0" name="myserver"/>
         <create type="JDBCConnectionPool" name="OneSourceConnectionPool">
         <set attribute="DriverName"
         value="oracle.jdbc.OracleDriver"/>
         <set attribute="InitialCapacity" value="1"/>
         <set attribute="MaxCapacity" value="5"/>
         <set attribute="Password" value="rating"/>
         <set attribute="Properties" value="user=rating"/>
         <set attribute="RefreshMinutes" value="0"/>
         <set attribute="ShrinkPeriodMinutes" value="15"/>
         <set attribute="ShrinkingEnabled" value="true"/>
         <set attribute="TestConnectionsOnRelease" value="true"/>
         <set attribute="TestConnectionsOnReserve" value="true"/>
         <set attribute="TestConnectionsOnCreate" value="true"/>
         <set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/>
         <set attribute="URL"
         value="jdbc:oracle:thin:@xyz.com:1522:oradvl"/>
         <set attribute="Targets" value="myserver"/>
         </create>
         </wlconfig>
    </target>
    When I run it, I see the following error:
    BUILD FAILED
    C:\ganymede\eclipse\workspace1\RtgSvr\build.xml:286: Failed to connect to the server: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
         java.io.EOFException]
    Can anybody please help me regarding this...
    Thank you,
    Sowmya

    Hi everybody,
    Thank you very much for your replies....actually I added weblogic.jar to the classpath of the target. So, now I dont see that error. But, I have another problem which is as follows:
    <target name="initJDBC">
    <wlconfig url="t3://${host}:${port}" username="${username}" password="${password}">
         <query domain="domain.name" type="Server" name="${target.server}" property="${target.server}"/>
         <create type="JDBCConnectionPool" name="TestConnectionPool">
         <set attribute="DriverName" value="oracle.jdbc.OracleDriver"/>
         <set attribute="Password" value="welcome"/>
         <set attribute="Properties" value="user=welcome"/>
         <set attribute="URL" value="jdbc:oracle:thin:@test.com:1522:oradvl"/>
              <set attribute="Targets" value=""/>
         <set attribute="TestTableName" value="SQL SELECT 1 FROM DUAL"/>
         <set attribute="TestConnectionsOnRelease" value="false"/>
         <set attribute="TestConnectionsOnReserve" value="true"/>
         </create>
         <create type="JDBCDataSource" name="TestDataSource">
              <set attribute="JNDIName" value="TestDataSource"/>
              <set attribute="PoolName" value="TestConnectionPool"/>
              <set attribute="Targets" value=""/>
              </create>
         </wlconfig>
         </target>
    I am not knowing what to give in the value field of <set attribute="Targets" value=""/>. The following is my build.properties file:
    target.server=myserver
    host=127.0.0.1
    port=7001
    username=weblogic
    password=weblogic
    domain.name=testDomain
    If I give <set attribute="Targets" value="${myserver}"/>, I get the following error:
    BUILD FAILED
    C:\ganymede\eclipse\workspace1\TestSvr\build.xml:290: Property not set: ${myserver}
    When I set myserver=myserver in build.properties, I get the following error:
    BUILD FAILED
    C:\ganymede\eclipse\workspace1\TestSvr\build.xml:290: Error invoking MBean command: java.lang.IllegalArgumentException: Property Name and value not valid for the MBean. Value myserver for parameter[Targets].java.lang.IllegalArgumentException: Unable to convert the argument valuemyserver to class javax.management.ObjectName.java.lang.reflect.InvocationTargetException
    Can someone plzz help me in this regard.
    Thank you,
    Sowmya

  • API for creating a new folder in Shared Queries through C # in TFS 2013

    Hi ,
              Is it possible to create a new folder in "Shared Queries" in Team foundation Server 2013 by using C#. I'm able to access the queries and even modify them by using the StoredQuery class and
    the QueryText function . We had a case to create a new folder in the Shared Queries part of the project.
              I have been and I am still looking for classes / api's that will enable me to do this .Any pointers to help me would be greatly appreciated.
             Do let me know if I have to provide more information.
    Regards,
    Arun

    Hi Arun,  
    Thanks for your post.
    To create new folder under Shared Queries, you can try below code snippet:
    TfsTeamProjectCollection tfs =
    new
    TfsTeamProjectCollection(new
    Uri("collectionURL"));
    tfs.EnsureAuthenticated();
    WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
    var queryHierarchy = workitemstore.Projects["teamprojectname"].QueryHierarchy;
    QueryFolder currentLocation = queryHierarchy["Shared
    Queries"]
    as
    QueryFolder;
    var folder =
    new
    QueryFolder("foldername");
    currentLocation.Add(folder);
    currentLocation = folder;
    queryHierarchy.Save();
    For more information, please refer to the example in this article:
    http://bzbetty.blogspot.in/2012/12/tfs-automation-automatically-creating.html.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error while login as sysdba for creating a new db

    Hi DBAs,
    i need to create a new database base, so trying to login as sysdba after exporting <ORACLE_SID> and <ORACLE_HOME> and getting the following error, need your help urgently.
    SQL> conn / as sysdba
    exec(): 0509-036 Cannot load program oracleDBDOC because of the following errors:0509-150 Dependent module /data/oracle/product/10.2.0.3/lib/libjox10.a(shr.o) could not be loaded.
    0509-022 Cannot load module /data/oracle/product/10.2.0.3/lib/libjox10.a(shr.o)0509-026 System error: The file access permissions do not allow the specified action.
    Regards
    Asif

    I am not very sure about the error but it seems to some permission related error on oracle binaries. Can you check those permissions.
    Have you created pwd file for db ?
    Cheers

  • Best Practice for Creating a New WebHelp Project from an Existing One

    I'm currently working in WebHelp Pro (RH version is 9.0.2.271).
    I have a WebHelp project which currently supports the 2012 version of one of our projects. What I needed to do was to create a separate 2013 project, using the 2012 files as the starting point. I couldn't find a way in RH to create a new project by importing an existing WebHelp project, so I copied the 2012 files to a new directory, opened up the project, and renamed it.
    What prompts this question is that following this exercise, all seemed well, for a time. However, I have recently had to create new topics in the 2012 version. However, when I imported these topics to the 2013 project and compiled, they vanished--although the htm files still appear in the appropriate 2013 file folder (when viewed with Windows Explorer).
    After reading some forum postings, I thought that I might have corrupted my database by improperly creating the new project--but if what I did is the wrong way to go about it, I'm not sure what the correct way is. I will be grateful for any suggestions.

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • IMG Settings for creating a new sales order type

    Hello All,
    I seek you valuable inputs on the steps to follow in IMG(SPRO) setting to create a new sales order type in the system.
    I want to create a new sales order type for which i have done the following setting in IMG,
    1) Sales and Distribution->Sales->Sales Document Header->Define sales document type.
    2)  Sales and Distribution->Sales->sales Document Header->Assign Sales Area To Sales Document Types.
    3) Sales and Distribution->Sales->Sales Document Item->Define Items Categories
    4) Sales and Distribution->Sales->Sales Document Item->Assign Item categories
    5) Sales and Distribution->SalesàSchedule Lines->Assign Schedule lines Categories.
    Also created a new number range for the same.
    After this when i am trying to create a sales order with VA01 i get an error "Enter a Sales Area".
    what am i missing ?Please suggest.
    Thanks in advance,
    Swati

    Hello,
    In the Initial screen of VA01 you have to enter the sale area which is nothing but the combination of
    Sales organization
    Distribtion channgel
    Division
    And in the transaction code  OVAZ you should assign the sales document type for this sales area .
    Please revert if you need any frther clarification
    regards,
    santosh

  • I need a procedure for creating a new user in SAP NW(BPC)

    Hi,
    I am doing Migration project from SAP BPC MS to NW.
    I don't know how to create a new user in NW.
    Could you please provide a document to create or add a new user in NW.
    Thanks and Regards
    Krishna

    Hi Krishna,
    If user authentication method is AD, all AD users can be added into BPC for the required access, The task 'Define Security' covers who can add users, create or modify task and member profiles.
    The guide is a good place to start understanding it.
    If you already have a list of users and would want to mass manage the users into your new system, you could also use the program: ZUJE_MASS_USER_MGMT (to import users, teams, profiles into the target system).
    Note: Users and Teams are not included in the transport. So you need to manage them outside either by using the program that I mentioned above or add them individually using admin client.
    Thanks,
    Sreeni

  • BDC Recording for creating a new Transport request

    Hi folks,
            I have done BDC to update a view. It has to update the values in view and create a new request at run time. Its working fine in foreground. But when it comes to back ground, it shows error, saying no batch input data for that screen. Here i am cliking 'create new request' icon to create new request and system will generate a request at runtime. So it might be showign that error. Could any body suggest me how to handle this error. How to create a new request in BDC recording at ruen time....Thanks in advance..
              Shyam.

    Hi Shyam,
    Please check the recording. I think you have missed some thing  while recording.
    Best regards,
    raam

  • Time Estimate for creating a new Discoverer Report

    Hi,
    Can anyone tell me how to estimate time required to create a new Discoverer Report?
    It would be great if anyone give me a template / tool for calculating the time estimate..I know, its a manager's job, but I am supposed to give this time estimate for a report.
    The requirement is, to convert Apps standard Invoice Aging Report into Discoverer Report. As far as I know, this is much complex report in Apps.
    Thanks!
    Yogini

    Hi Yogini,
    I’ve just looked at the ‘Invoice Aging Report’, and it shouldn’t be too difficult to convert into a Discoverer Report.
    The time scales really depend on the following:
    -whether the Discoverer Report has been fully spec’d out by the customer.
    Sometimes it’s not a matter of just copying a standard Apps report into Discoverer, as they can always be improved on. It’s best to get the customer to specify exactly what they want on paper first, such as any additional columns, sorts, what parameters etc. Creating a ‘Discoverer Business Requirement Form’ could come in handy, to capture all of this information from the customer, hopefully avoiding them giving you the run around.
    -if the EUL has all the required items for the report
    An item required in the report might not exist in the EUL. If this is the case, do you need to go through Change Control to get it put in? How long would this take?
    -how quickly can get the report into a TEST instance for the customer to test before signing off the change to go in LIVE. Sometimes Customers can hold this process up, so give yourself a couple of days.
    So the time you give really depends on how comfortable you feel with the module (AP) and the actual creation of Discoverer Reports. It obviously also depends on your business processes which can always slow things down.
    As for the report, I’ve actually made a report very similar for the Transactions Age Debt (AR). It could help you a bit.
    To calculate the Days Overdue you could use a Calculation below:
    SYSDATE-Payment Schedules.Due Date
    To calculate the 1 - 30 Days you could use a Calculation with a case statement below.
    CASE WHEN Days Overdue BETWEEN 0 AND 30 THEN Balance Due ELSE TO_NUMBER(NULL) END
    Otherwise no Time Estimated Calculation form… But hope the info will help.
    Cheers,
    Lance

Maybe you are looking for