Howto add thread to ThreadGroup

Hello,
If i create a thread what is it add threadGroup.
example:
public class OneThread extends Thread {
public boolean state = true;
public OneThread() {
public void run() {
while( state != false ) {
System.out.println("Running");
wait(2000);
public void ThreadStop() {
state = false;
OneThread one = OneThread();
one.start;
if I create one or more thread howto add the ThreadGroup??
Regards
Richard

you must know that:
- there is no necessity for putting a thread in a group
- if you WANT or NEED to put it in a group, the procedure is the following one:
1 : create a threadgroup object
2 : when you create your thread (or thread extension) object, you have to call the constructor containing the threadgroup parameter
a reply was posted to show you how to proceed ; take a look at it
but keep in mind that there it's not an obligation to handle thread groups

Similar Messages

  • Main Thread's ThreadGroup

    Bonjour to all
    I was wondering if anyone knew how to obtain the main Thread's ThreadGroup so that I can overide the ThreadGroups uncoughtException method? For example, all my applications have a static main method (of course), and it is executed in the main thread, so how could I possibly obtain this threads ThreadGroup to manipulate it's execution after an exception is thrown?
    Thanx

    I wonder if you get Duke Dollars if you reply to your own postings ;-)
    Anywho, here's how you can get at the current thread group (I can't believe I didn't see it when I posted the question)
    Thread.currentThread.getThreadGroup()
    and I THINK that there isn't a way to modify implementational details dynamically, thus dissallowing the overriding of uncaughtException in the main Java execution thread (duh)

  • HOWTO add a Windows XP laptop to Airport Network as a client.

    I have an existing Airport Network using Airport Extreme and WPA2 Personal Security.
    I need to add a Windows machine as a client on this network. The windows box is an IBM Thinkpad with 512MB RAM, Windows XP Service Pack 2, and a Cisco 350 Series Wireless card.
    Do I need additional software do I need in order to add the Windows box to my Airport Network, also is there a HOWTO for connecting the Windows box to an airport network??
    Thanks in advance...
    catharine

    ...is there a HOWTO for connecting the Windows box to an airport network??
    Check out this excellent article from iFelix: Accessing a Airport Network with a Windows XP PC or laptop (with XP SP2)

  • Howto add "With Authorization" for removel to Enrollment Profiles?

    When I enroll a iOS device to our Profile manager it get's an "Remote Management" profile which the user can remove without restriction.
    When I add profiles later on, they are all linked to this firest profile and can all be deleted by deleting the first profile. It doesn't matter if the latter has a removal restriction set.
    So how do I lock the Enrollment Profiles??

    Of course, the previous posting is not really related to this thread and therefore ought to have be posted as a New topic, but seeing as how AS has introduced the subject...
    Here is the way to add a unique constraint to a populated column, ensuring that the existing values are unique as well.
    ALTER TABLE t1
    ADD CONSTRAINT t1_uk UNIQUE (col1,col2)
    EXCEPTIONS INTO my_exceptions
    /If the alter table statement fails this will populate the EXCEPTIONS table with the rows that contain duplicate values for (col1,col2). These are identified by ROWID. We can then chose to:[list]
    [*] delete rows with a bad key;
    [*] amend the values of the key columns;
    [*] re-apply the constraint with the NOVALIDATE option.[list]
    We should be wary of choosing the NOVALIDATE option. There's usually a good reason why the unique constraint is required and we should not circumvent it. Apart from anything else, Oracle allows us to build foreign keys referencing NOVALIDATE unique keys. This could result in child rows that have two parents, which is normal in biology, but very wrong in a database. NOVALIDATE is useful in datawarehouses and suchlike, because little updating occurs and the data integrity issues are of less imporatance. I don't think it ought to be used in OLTP situations.
    Once we have handled the duplicate values we can re-run the alter table statement and apply the constraint.
    If you don't already have an EXCEPTIONS table (it can be called anything, it's the structure that counts) you may need to run (or get a DBA to run) a script called UTLEXCPT.SQL, which will be in the $ORACLE_HOME/rdbms/admin directory.
    Cheers, APC

  • How to add thread in ThreadPoolExecutor to shutdownhook

    I want my application finish task submitted, and try to use Runtime.addShutdownHook(). but how can I add the thread in ThreadPoolExecutor to ShutdownHook?. Is it possible to get the thread in pool? I think the pooled thread will be killed on kill command ( linux)

    Why not just do something like:
              final ThreadPoolExecutor executor = null;
              Runtime.getRuntime().addShutdownHook(new Thread() {
                   @Override
                   public void run() {
                        int fiveSeconds = 5;
                        try {
                             executor.awaitTermination(fiveSeconds, TimeUnit.SECONDS);
                        } catch (InterruptedException e) {
                             // ignore - we're shutting down
              });-Muel

  • Toshiba 46TL968G HowTo add apps and Problem with flash in Webbrowser

    Hi all,
    I have 2 problems regarding Toshiba 46TL968G.
    1) is that possible to install apps on this TV? I searched online that TOSHIBA ePortal could be used to add Apps, but I cannot find it in 46TL968G. Is it supported by this model?
     - If yes, how can I access.
     - If no, how can I install Apps. The Apps found in TOSHIBA Places are fixed and not really helpful. I prefer to install more.
    2) Does the web browser support adobe flash? When I open youtube media, it shows "please install adobe flash". I cannot see any media on web browser. It is interesting that Youtube works fine in TOSHIBA Places.
    Regards

    That doesn't appear to be a US model, and this is the forums for Toshiba USA. You may want to contact Toshiba in your region.
    - Peter

  • Howto add static text in xsl stylesheet

    Hi,
    I'am having problems trying to write a static text to a fixed length file using the file adapter.
    I'am using the FlatStructure sample provided.
    When I run the sample, there's no problem... But when I remove the mapping from tns:State <-> fix:State (in addr1Toaddr2.xsl) and change the fix:State to a static text (Set Text option in right mouse popup menu) then this text will NOT show up in the written fixed length file.
    My addr1Toaddr2.xsl looks like this:
    <?xml version="1.0" encoding="windows-1252"?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="file://D:/OraBPELPM_2/integration/bpelpm/orabpel/samples/tutorials/121.FileAdapter/FlatStructure/address-csv.xsd"/>
    <rootElement name="Root-Element" namespace="http://xmlns.oracle.com/pcbpel/demoSchema/csv"/>
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="file://D:/OraBPELPM_2/integration/bpelpm/orabpel/samples/tutorials/121.FileAdapter/FlatStructure/address-fixedLength.xsd"/>
    <rootElement name="Root-Element" namespace="http://xmlns.oracle.com/pcbpel/demoSchema/fixedLength"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 1.0 AT [WED MAY 18 11:29:24 CEST 2005]. -->
    ?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xmlns.oracle.com/pcbpel/demoSchema/csv" xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" xmlns:fix="http://xmlns.oracle.com/pcbpel/demoSchema/fixedLength" xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap" xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20" xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/" xmlns:ora="http://schemas.oracle.com/xpath/extension" xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc" exclude-result-prefixes="xsl xsd tns nxsd fix ldap xp20 bpws ora orcl">
    <xsl:template match="/">
    <fix:Root-Element>
    <xsl:for-each select="/tns:Root-Element/tns:Address">
    <fix:Address>
    <fix:Name>
    <xsl:value-of select="tns:Name"/>
    </fix:Name>
    <fix:Street>
    <xsl:value-of select="concat(tns:Street1,' ',tns:Street2)"/>
    </fix:Street>
    <fix:City>
    <xsl:value-of select="string('C2345678901')"/>
    </fix:City>
    <fix:State>
    <xsl:text disable-output-escaping="no">D2345678901
    </xsl:text>
    </fix:State>
    <fix:Country>
    <xsl:value-of select="string('E234567')"/>
    </fix:Country>
    </fix:Address>
    </xsl:for-each>
    </fix:Root-Element>
    </xsl:template>
    </xsl:stylesheet>
    Note:
    The construct "<xsl:value-of select="string('E234567')"/>" is my 'patch'to write a static text.
    Can you tell me what I'am doing wrong? Or is this a bug...
    greetings,
    Jan.

    Hi ,
    I am assuming you are using Oracle JDeveloper XSL Mapper for designing the XSL. Currently , our XSL Mapper has a limitation due to that whenever you add any static text to target node in mapper, it adds an extra "\n" with that static text. And so our Native format translator doesn't find the definition for that and that's why it doesn't get printed in the file.
    Workaround [although little painful] is remove those extra "\n" after you finish your XSL design.
    We are working to fix this issue asap.
    HTH.
    Thanks,
    Rakesh

  • HOWTO: Add a UNIQUE constraint to a populated column

    Here is the way to add a unique constraint to a populated column, ensuring that the existing values are unique as well.
    ALTER TABLE t1
    ADD CONSTRAINT t1_uk UNIQUE (col1,col2)
    EXCEPTIONS INTO my_exceptions
    /If the alter table statement fails this will populate the MY_EXCEPTIONS table with the rows that contain duplicate values for (col1,col2). These are identified by ROWID. We can then chose to:
    [list]
    [*]delete rows with a bad key;
    [*]amend the values of the key columns;
    [*]re-apply the constraint with the NOVALIDATE option.
    [list]
    We should be wary of choosing the NOVALIDATE option. There's usually a good reason why the unique constraint is required and we should not circumvent it. Apart from anything else, Oracle allows us to build foreign keys referencing NOVALIDATE unique keys. This could result in child rows that have two parents, which is normal in biology, but very wrong in a database.
    NOVALIDATE is useful in datawarehouses and suchlike, because little updating occurs and the data integrity issues are of less imporatance. I don't think it ought to be used in OLTP situations. The code example at the end of this posting illustrates why we should exercise caution with NOVALIDATE.
    Once we have handled the duplicate values we can re-run the alter table statement and apply the constraint.
    If you don't already have an EXCEPTIONS table (it can be called anything, it's the structure that counts) you may need to run (or get a DBA to run) a script called UTLEXCPT.SQL, which will be in the $ORACLE_HOME/rdbms/admin directory.
    Cheers, APC
    SQL> SELECT col1, col2, col3 FROM t1;
          COL1       COL2       COL3                                               
             1          1          0                                               
             2          1          0                                               
             2          1          0                                               
    SQL> SELECT col1, col2, cola FROM t2;
          COL1       COL2 COLA                                                     
             1          1  I'm child #1                                                        
             1          1  I'm child #2                                                        
             2          1  I'm child #3                                                        
    SQL> ALTER TABLE t1
      2  ADD CONSTRAINT t1_uk UNIQUE (col1, col2);
    ALTER TABLE t1 ADD CONSTRAINT t1_uk UNIQUE (col1, col2)
    ERROR at line 1:
    ORA-02299: cannot validate (TST2.T1_UK) - duplicate keys found We can't add a unique key, so we decide to use the NOVALIDATE clause.
    SQL> CREATE INDEX t1_i ON t1(col1, col2);
    Index created.
    SQL> ALTER TABLE t1
      2  ADD CONSTRAINT t1_uk UNIQUE (col1, col2) ENABLE NOVALIDATE;
    Table altered.
    SQL> INSERT INTO t1 VALUES (2, 1, 1);
    insert into t1 values (2, 1, 1)
    ERROR at line 1:
    ORA-00001: unique constraint (TST2.T1_UK) violated Well, we can't add any more duplicate keys, so that's alright isn't it? Nope. We can add a foreign key to table T2 referencing T1 but we don't know which row in T1 is the parent of the rows in T2.
    SQL> ALTER TABLE t2
      2  ADD CONSTRAINT t2_t1_fk foreign key  (col1, col2)
      3  REFERENCES t1(col1, col2)
    Table altered.
    SQL> SELECT rowid FROM t1 WHERE col1 = 2;
    ROWID                                                                          
    AAAVnMAANAAAB96AAB                                                             
    AAAVnMAANAAAB96AAC                                                             
    SQL> DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAB';
    1 row deleted.
    SQL> DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAC';
    DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAC'
    ERROR at line 1:
    ORA-02292: integrity CONSTRAINT (TST2.T2_T1_FK) violated - child record found
    SQL> ROLL
    Rollback complete.
    SQL> DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAC';
    1 row deleted.
    SQL> DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAB';
    DELETE FROM t1 WHERE rowid = 'AAAVnMAANAAAB96AAB'
    ERROR at line 1:
    ORA-02292: integrity CONSTRAINT (TST2.T2_T1_FK) violated - child record found
    SQL>  ROLL
    Rollback complete.
    Why this matters: queries joining child and parent tables return more rows than we'd expect normally.
    SQL> SELECT t2.cola
      2  FROM   t2
      3  WHERE  t2.col1 = 2
      4  and    t2.col2 = 1;
    COLA                                                                           
    I'm child #3                                                                   
    SQL> SELECT t2.cola, t1.col4
      2  FROM   t1, t2
      3  WHERE  t2.col1 = 2
      4  AND    t2.col2 = 1
      5  AND    t1.col1 = 2
      6  AND    t2.col2 = 1;
    COLA                    COL4                                                   
    I'm child #3            I'm the daddy                                          
    I'm child #3            No, I'm the daddy!!                                    
    SQL> Caveat emptor
    This posting is issued on behalf of the Rogue Moderators. It is posted with the best of intentions but is not guaranteed in any way, shape or form. In particular, the code is presented "as is" and you assume full responsibility for running it on your system. Furthermore, you must not download and install software from the internet unless you know what you are doing and have the permission of whoever owns your system. It was never this hard for the Lone Ranger.

    Hi,
    You can not create unique key with duplicate values as you know. Now if you want to create unique key then you have to delete duplicate records from the table but this again if you can afford to delete because this data may be more importante to you and you can not delete any record.
    or you can use ENABLE NOVALIDATE option of oracle explain by Tom on below link.
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:8806498660292
    or if you dont want to use Tom's way then you go with primary key like
    Drop old primary key if there is already on the column.
    create new primary key with enable novalidate option.

  • Howto add date range parameters to linechart?

    I'm using SQL Server 2014 and SSDT 12. I have a linechart generated using three fields - FCP, NFS (both integers) and TimeIndex (the datetime over 30 days).
    I see how to add parameters but how do I allow users to specify a date range? For example to only view data from 01/12/2014 - 07/12/2014.
    Thanks in advance
    Adam

    Found this myself eventually in case anyone else needs it:
    http://100rov.blogspot.co.uk/2012/12/create-calendar-parameter-with-start.html

  • Howto add adiuo track to video in Compressor

    I exported video from Final Cut to Compressor for burning on DVD, after I deleted source files in FCP. Now I have 2 separate files with video and audio, how can I convert them to one file for iPod?
    If I add both files to Compressor it creates two separate jobs, is there any option to add audio track to video?

    Interesting problem....
    If you've created a DVD (or VIDEO_TS) you can use an app like DVDxDV (www.dvdxdv.com) to create a QT movie from the source.
    or
    You can transcode the AC3 file to an AIFF 48k/16 pcm file in Compressor, and then transcode the MPEG-2 video stream to whatever I-Frame codec you want to work with (DV, ProRes, etc). Next, take those two files into FCP and sync, or use QT Pro's "Add to Movie" command and Save As a self-contained movie.
    BG

  • Howto add multiple files in mucow

    hi guys,
    so i'm very new at creating mucow files for muse, I have already created one called "YTPlayer" which is available on the muse addons site but now I want to
    create more complex ones...
    i'm working on creating a carousel mucow based off of a jquery plugin but I am stuck on how to let the user add multiple images files via the mucow and then
    have those files included in the code... for example if I wanted to let them add 3 image files to the carousel I could create 3 <text> parameters where they would
    specify the name of the images and then they could use the upload function of muse to upload the images and I could use something like this:
    <pageItemHTML>
    <![CDATA[
         <img src="assets/{param_image1}">
         <img src="assets/{param_image2}">
         <img src="assets/{param_image3}">
    ]]>
    </pageItemHTML>
    but of course this then limits them to 3 images only, how can I let them select many images and then specify that in the mucow code?... is this even possible?
    -thanks

    if all images have the same name following a number then you could add one text field only:
    <pageItemHTML> 
    <![CDATA[
         <img src="assets/{param_image}1">
         <img src="assets/{param_image}2">
         <img src="assets/{param_image}3">
    ]]> 
    </pageItemHTML> 
    It's not the best solution, but it works.

  • Howto add user role in OID for PORTAL use from wihtin SSO SERVER plugin

    Hi all,
    Can someone help me with this issue:
    I'm developing a custom authentication module for SSO Server. From this plugin I would like to set the roles/groups to which that user belongs, before the redirect to the Portal is done.
    I'm adding the user attributes to the OID via the DirContext.modifyAttributes(..) method from within the plugin. However I don't know how to add the roles/group definition to the user entry in the OID so that Oracle Portal can show a personalized desktop when the user logs on.
    Hope someone can point me in the right direction.
    Many thanks in advance!
    Kind regards,
    Chris

    Chris ,
    Do you know how to get user role in OID? Did you fix this issue. i have same job in this point.
    Thanks

  • Howto add user to group without logout/login

    Hi All,
    Sometimes I have o add myself to a group in order to get access to a file.
    # usermod -a -G video cedric
    Before I can actually get access to the file, I have to logout and login. I have figured out I can avoid it by doing this:
    # su
    # usermod -a -G video cedric
    # su cedric
    $ now I can access the file
    Is there a way to update the rights without the logout / login?
    Best regards,
    Cedric

    Using the newgrp command will start a new environment with the group membership.

  • Howto add a string to multiple files from the shell

    Hi,
    I want to add a line of text to several files.
    I can locate the files I want to add the text line to using this command: grep -lr "/bin/sh" .
    This generates the list of files I need to modify.
    Now, I want to add a string - LANG=he_IL - to all those files, AFTER the line #!/bin/sh (this line always comes first in every file).
    Can anyone suggest a simple bash script to do so?
    Thanks a lot,
    Fiod

    Read up on sed.
    End of line sign is '$'. So that would become:
    sed 's/$/LANG=he_IL/' files
    /edit
    Oh and to skip the first line there's a rule too, but you could also use something like:
    sed '\@#\!/bin/sh@!s@$@LANG=he_IL@' files
    please first test this code on an example in case I forgot something!
    Last edited by ibendiben (2009-01-23 11:49:13)

  • HowTo add ContextualGroup to ribbon menu?

    Hi,
    on my Wiki-Pages i like to add an custom "ContextualGroup" to the ribbon menu.
    the "ContextualGroup" sould only display if the page is in the edit mode!
    i have got this, but it doesnt work :/ any ideas?
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="Extended.Wiki" Location="CommandUI.Ribbon.EditForm">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition Location="Ribbon.ContextualTabs._children">
    <ContextualGroup Id="Extended.Wiki.ContextualGroup" Sequence="50" Color="Orange" Command="Extended.Wiki.Command" ContextualGroupId="Extended.Wiki.Contextual" Title=" ">
    <Tab Id="Extended.Wiki.ContextualTab" Title=" " Description="Groups and controls will go in here" Sequence="501">
    <Scaling Id="Extended.Wiki.Scaling">
    <MaxSize Id="Extended.Wiki.MaxSizeNew" GroupId="Extended.Wiki.MyWorkGroupNew" Size="MyWorkLayout" Sequence="10" />
    <MaxSize Id="Extended.Wiki.MaxSizeManage" GroupId="Extended.Wiki.MyWorkGroupManage" Size="MyWorkLayout" Sequence="20" />
    <Scale Id="Extended.Wiki.Scaling.MyWorkTabScalingNew" GroupId="Extended.Wiki.MyWorkGroupNew" Size="MyWorkLayout" Sequence="30" />
    <Scale Id="Extended.Wiki.Scaling.MyWorkTabScalingManage" GroupId="Extended.Wiki.MyWorkGroupManage" Size="MyWorkLayout" Sequence="40" />
    </Scaling>
    <Groups Id="Extended.Wiki.Groups">
    <Group Id="Extended.Wiki.MyWorkGroupNew" Description="New group description" Title="New" Command="MyWorkContextualTab.EnableMyWorkGroupNew" Sequence="52" Template="Ribbon.Templates.MyWorkTemplate">
    <Controls Id="Extended.Wiki.MyWorkGroupNew.Controls">
    <Button Id="Extended.Wiki.MyWorkGroupNew.NewItem" Command="Extended.Wiki.NewItemCommand" Sequence="15" Description="Add a new item" LabelText="New Item" TemplateAlias="ONERW" Image32by32=" " />
    </Controls>
    </Group>
    </Groups>
    </Tab>
    </ContextualGroup>
    </CommandUIDefinition>
    </CommandUIDefinitions>
    </CommandUIExtension>
    </CustomAction>
    </Elements>
    thanks,
    Matthias

    http://sharepoint.stackexchange.com/questions/13585/why-are-some-tabs-doubling-up-and-my-custom-contextual-tab-not-showing
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/62f1cc44-52d7-407c-b362-c5549fdb14ca/not-able-to-use-contextualgroup-on-ribbon-in-sharepoint-2013-?forum=sharepointdevelopment

Maybe you are looking for

  • Display 4 parameters in the body of the error message

    How do I display 4 parameters in the body of the error message when a CAPI fires? By default only the primary key is inculded in the body of the message generated by default for any CAPI. For e.g. I have an employee table with following columns: emp_

  • ICal does not appear in my list of applications

    Recently bought a used mac pro.  Updated all software, running OS X 10.6.8 .  I can't find the iCal application anywhere, even did a seach using the Finder.  Can anyone help?

  • Web Service and Stub-generation with WTK

    Hi there, I hope someone can help me. I just deployed a webservice using Axis. WSDL: http://www.freewebs.com/sirpreis/CustomerWS.xml WSDD (for deployment): http://www.freewebs.com/sirpreis/customerWS-WSDD.xml The WS deploys fine, but now I want to ge

  • How to turn of phone calls but keep data?

    Is there a way to turn off all calls and texts but keep the data option on, for streaming music specifically. I need to be able to steam music but without interuption from calls or texts.

  • Adding URL field to CCM catalog

    Hi, Is there any way to add new URL field and display it at the CCM Catalog? I donu2019t want to add links to images; I want to add links to internal web sites. I added a /CCM/URL kind of field but the system has changed it to string. Do I have to de