Static Thread + Thread() constructor

Hi!
I want to make a thread which will behave similar to "awt event dispatching thread". I want it to do some tasks by simply passing a runnable to method named addTask (this is similar to invokeLater or invokeAndWait in EventQueue)...
QUESTION #1
I know how to make thread waiting for task. What I want to know is your opinion about the way of creating static thread. Is this the right way how to do that? :
public class TaskThreadHandler implements Runnable {
     private static final Runnable r = new TaskThreadHandler();
     private static final Thread t = new Thread(r);
     public void run(){/*thread start point*/}
     public void addTask(Runnable r){
          /*This will force the thread to do the task*/
}QUESTION #2
What is the aim of the Thread( void ) constructor? Where starts such a Thread if I call new Thread().start() (I didn't pass there any Runnable, so where??)?
Many thanks
Miso

Something like this:
public class TaskThreadHandler {
  private Thread myThread;
// constructor is private because we always construct from getInstance();
private TaskThreadHandler() {
      myThread = new Thread(new Runnable() {
          public void run() {
               go();
            }, "Worker thread");
       myThread.start();
private static TaskThreadHandler inst;
* Return single instance of class
public synchronized TaskThreadHandler getInstance() {
      if(inst == null)
         inst = new TaskThreadHandler();
     return inst;
private BlockingQueue<Runnable> queue = new LinkedListBlockingQueue();
// thread body runs until thread interrupted.
private void go() {
    try {
       while(!myThread.interrupted()) {
          queue.take().run();
    } catch(InterruptedException e) {
etc.

Similar Messages

  • Exception in thread "Thread-4" java.lang.IllegalAccessError

    Hi All,
    I am getting this error at run-time while trying to run below code
    Exception in thread "Thread-4" java.lang.IllegalAccessError
    CODE:
    ================================
    * FileName : UMAC.java *
    * Program Details : For getting Signed data. *
    * Invoked From : SignedDataImpl.java *
    package sfmsbr.bankapi;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.security.InvalidKeyException;
    import java.security.Key;
    import java.security.KeyPair;
    import java.security.KeyStore;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;
    import java.security.NoSuchProviderException;
    import java.security.PrivateKey;
    import java.security.PublicKey;
    import java.security.Security;
    import java.security.Signature;
    import java.security.cert.Certificate;
    import java.security.cert.X509Certificate;
    import java.util.Date;
    import java.util.Enumeration;
    import javax.crypto.BadPaddingException;
    import javax.crypto.Cipher;
    import javax.crypto.IllegalBlockSizeException;
    import javax.crypto.NoSuchPaddingException;
    import com.ibm.misc.BASE64Decoder;
    import com.ibm.misc.BASE64Encoder;
    import sun.security.pkcs.ContentInfo;
    import sun.security.pkcs.PKCS7;
    import sun.security.pkcs.PKCS9Attribute;
    import sun.security.pkcs.PKCS9Attributes;
    import sun.security.pkcs.SignerInfo;
    import com.ibm.security.util.DerOutputStream;
    /*import sun.security.x509.AlgorithmId;*/
    import com.ibm.security.x509.AlgorithmId;
    /*import sun.security.x509.X500Name;*/
    import com.ibm.security.x509.X500Name;
    /*import com.ibm.jsse.IBMJSSEProvider;*/
    import org.apache.harmony.security.asn1.DerInputStream;
    import com.cs.common.Utilities;
    import com.sun.net.ssl.internal.ssl.Provider;
    /*import javax.net.ssl.*;*/
    import sun.security.pkcs.*;
    public class UMAC
    private static String storetype = null;
    private static String storepath = null;
    private static char keyPassword[] = null;
    private static char filePassword[] = null;
    private static String alias = null;
    private static X509Certificate x509 = null;
    private static Certificate certs[] = null;
    private static final String digestAlgorithm = "SHA256";
    private static final String signingAlgorithm = "SHA256withRSA";
    private static Key key = null;
    private static KeyPair pair = null;
    private static KeyStore keystore = null;
    private static PrivateKey priv = null;
    private static PublicKey pub = null;
    private static String signedData = null;
    File certificateFile;
    private static String fileName = "";
    private static final String ALGORITHM = "PBEWithSHA256AndDes";
    private String characterEncoding;
    private Cipher encryptCipher;
    private Cipher decryptCipher;
    private BASE64Encoder base64Encoder = new BASE64Encoder();
    private BASE64Decoder base64Decoder = new BASE64Decoder();
    * Constructor to initialize the Parameters used
    * @param s file name/path
    * @param s1 is file password
    * @param s2 is key password
    * @param s3 is alias name
    * @throws IOException
    public UMAC(String s, String s1, String s2, String s3) throws IOException
    try {
    String dkeyPassword = Utilities.decodeDBPwd(s2);
    String dFilePassword = Utilities.decodeDBPwd(s1);
    keyPassword = (new String(dkeyPassword)).toCharArray();
    filePassword = (new String(dFilePassword)).toCharArray();
    alias = s3;
    fileName = s;
    } catch (Exception e) {
    e.printStackTrace();
    * method will prepare the digital signature for the message received as argument and returns the digital signature
    * @param s the message to prepare signed data
    * @return signed data prepard for the message received
    * @throws NoSuchAlgorithmException
    * @throws InvalidKeyException
    * @throws IllegalBlockSizeException
    * @throws NoSuchProviderException
    * @throws BadPaddingException
    * @throws NoSuchPaddingException
    * @throws Exception
    public String getSingedData(String s) throws NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException, NoSuchProviderException, BadPaddingException, NoSuchPaddingException, Exception
    Security.addProvider(new Provider()); // addProvider(Provider provider).. Adds a provider to the next position available.
    System.out.println("reached here a");
    certificateFile = new File(fileName);
    /*keystore = KeyStore.getInstance("pkcs12", "SunJSSE");*/
    keystore = KeyStore.getInstance("pkcs12", "IBMJCE");
    System.out.println("reached here b");
    BASE64Encoder base64encoder = new BASE64Encoder();
    System.out.println("reached here ba");
    keystore.load(new FileInputStream(certificateFile), filePassword);
    System.out.println("reached here bb");
    Enumeration enumeration = keystore.aliases();
    do {
    if(!enumeration.hasMoreElements())
    break;
    String s1 = enumeration.nextElement().toString();
    if(keystore.isKeyEntry(s1))
    alias = s1;
    } while(true);
    System.out.println("reached here c");
    pair = getPrivateKey(keystore, alias, keyPassword);
    priv = pair.getPrivate();
    String s2 = base64encoder.encode(priv.getEncoded());
    if(keystore.isKeyEntry(alias))
    certs = keystore.getCertificateChain(alias);
    if(certs[0] instanceof X509Certificate)
    x509 = (X509Certificate)certs[0];
    if(certs[certs.length - 1] instanceof X509Certificate)
    x509 = (X509Certificate)certs[certs.length - 1];
    } else
    if(keystore.isCertificateEntry(alias))
    Certificate certificate = keystore.getCertificate(alias);
    if(certificate instanceof X509Certificate)
    x509 = (X509Certificate)certificate;
    certs = (new Certificate[] {
    x509
    } else {
    throw new Exception(alias + " Wrong alias, Please Check");
    AlgorithmId aalgorithmid[] = {
    AlgorithmId.get("SHA256")
    byte abyte0[] = s.getBytes("UTF8");
    System.out.println("reached here d");
    MessageDigest messagedigest = MessageDigest.getInstance("SHA256");
    messagedigest.update(abyte0);
    byte abyte1[] = messagedigest.digest();
    PKCS9Attribute apkcs9attribute[] = {
    new PKCS9Attribute(PKCS9Attribute.CONTENT_TYPE_OID, ContentInfo.DATA_OID), new PKCS9Attribute(PKCS9Attribute.SIGNING_TIME_OID, new Date()), new PKCS9Attribute(PKCS9Attribute.MESSAGE_DIGEST_OID, abyte1)
    PKCS9Attributes pkcs9attributes = new PKCS9Attributes(apkcs9attribute);
    Signature signature = Signature.getInstance("SHA256withRSA", "SunJSSE");
    signature.initSign(priv);
    signature.update(pkcs9attributes.getDerEncoding());
    byte abyte2[] = signature.sign();
    ContentInfo contentinfo = null;
    contentinfo = new ContentInfo(ContentInfo.DATA_OID, null);
    X509Certificate ax509certificate[] = {
    x509
    java.math.BigInteger biginteger = x509.getSerialNumber();
    SignerInfo signerinfo = new SignerInfo(new X500Name(x509.getIssuerDN().getName()), biginteger, AlgorithmId.get("SHA256"), pkcs9attributes, new AlgorithmId(AlgorithmId.RSAEncryption_oid), abyte2, null);
    SignerInfo asignerinfo[] = {
    signerinfo
    PKCS7 pkcs7 = new PKCS7(aalgorithmid, contentinfo, ax509certificate, asignerinfo);
    DerOutputStream deroutputstream = new DerOutputStream();
    pkcs7.encodeSignedData(deroutputstream);
    byte abyte3[] = deroutputstream.toByteArray();
    String s3 = new String(abyte3);
    BASE64Encoder base64encoder1 = new BASE64Encoder();
    String s4 = base64encoder1.encodeBuffer(abyte3);
    BASE64Decoder base64decoder = new BASE64Decoder();
    System.out.println("reached here e");
    byte abyte4[] = base64decoder.decodeBuffer(s4);
    PKCS7 pkcs7_1 = new PKCS7(abyte4);
    SignerInfo asignerinfo1[] = null;
    if(pkcs7_1.getContentInfo().getContentBytes() == null)
    byte abyte5[] = s.getBytes("UTF8");
    asignerinfo1 = pkcs7_1.verify(abyte5);
    } else
    asignerinfo1 = pkcs7.verify();
    if(asignerinfo1 == null) {
    throw new Exception("Signature failed verification, data has been tampered");
    } else {
    Utilities.log(3, "asignerinfo1 is not null Verification OK>>" + new Date(System.currentTimeMillis()), "UMAC", "run");
    return s4;
    * gets the private key for opening the signing file
    * @param keystore1
    * @param s is file path
    * @param ac
    * @return keypair
    * @throws Exception
    public KeyPair getPrivateKey(KeyStore keystore1, String s, char ac[]) throws Exception
    PublicKey publickey;
    System.out.println("inside UMAC.getPrivateKey");
    key = keystore1.getKey(s, ac);
    System.out.println("key --->" +key);
    if(!(key instanceof PrivateKey))
    return null;
    Certificate certificate = keystore1.getCertificate(s);
    publickey = certificate.getPublicKey();
    System.out.println("Returning from UMAC.getPrivateKey : publickey is --->" +publickey);
    return new KeyPair(publickey, (PrivateKey)key);
    ===========================================
    Its compiling properly but at run-time it's showing below error
    OUTPUT:
    ===========================================
    reached here a
    reached here b
    reached here ba
    Exception in thread "Thread-4" java.lang.IllegalAccessError
    at sun.security.util.DerInputStream.init(Unknown Source)
    at sun.security.util.DerInputStream.<init>(Unknown Source)
    at sun.security.rsa.RSAPublicKeyImpl.parseKeyBits(Unknown Source)
    at sun.security.x509.X509Key.decode(X509Key.java:396)
    at sun.security.x509.X509Key.decode(X509Key.java:408)
    at sun.security.rsa.RSAPublicKeyImpl.<init>(Unknown Source)
    at sun.security.rsa.RSAKeyFactory.generatePublic(Unknown Source)
    at sun.security.rsa.RSAKeyFactory.engineGeneratePublic(Unknown Source)
    at java.security.KeyFactory.generatePublic(KeyFactory.java:145)
    at com.ibm.security.x509.X509Key.buildX509Key(X509Key.java:278)
    at com.ibm.security.x509.X509Key.parse(X509Key.java:189)
    at com.ibm.security.x509.X509Key.parse(X509Key.java:215)
    at com.ibm.security.x509.CertificateX509Key.<init>(CertificateX509Key.java:112)
    at com.ibm.security.x509.X509CertInfo.parse(X509CertInfo.java:966)
    at com.ibm.security.x509.X509CertInfo.<init>(X509CertInfo.java:236)
    at com.ibm.security.x509.X509CertInfo.<init>(X509CertInfo.java:222)
    at com.ibm.security.x509.X509CertImpl.parse(X509CertImpl.java:2285)
    at com.ibm.security.x509.X509CertImpl.<init>(X509CertImpl.java:227)
    at com.ibm.security.x509.X509CertImpl.<init>(X509CertImpl.java:213)
    at com.ibm.security.pkcs12.CertBag.decode(CertBag.java:599)
    at com.ibm.security.pkcsutil.PKCSDerObject.decode(PKCSDerObject.java:251)
    at com.ibm.security.pkcs12.CertBag.<init>(CertBag.java:76)
    at com.ibm.security.pkcs12.BasicPFX.getCertificates(BasicPFX.java:1422)
    at com.ibm.security.pkcs12.PFX.getCertificates(PFX.java:549)
    at com.ibm.crypto.provider.PKCS12KeyStore.engineLoad(Unknown Source)
    at java.security.KeyStore.load(KeyStore.java:414)
    at sfmsbr.bankapi.UMAC.getSingedData(UMAC.java:137)
    at sfmsbr.bankapi.SignedDataImpl.getSingedData(SignedDataImpl.java:42)
    at com.cs.sfms.SFMSMessageSender.run(SFMSMessageSender.java:226)
    at java.lang.Thread.run(Thread.java:736)
    18:10:05 10-Feb-2012 AFTER JAVA Execution
    Please share your valuable inputs to resolve this
    Regards,
    Haris

    java version
    java version "1.6.0"
    Java(TM) 2 Runtime Environment, Standard Edition (build pap32devifx-20110211b (SR12 FP3 +IZ94331))
    IBM J9 VM (build 2.3, J2RE 1.6.0 IBM J9 2.3 AIX ppc-32 j9vmap3223ifx-20101130 (JIT enabled)
    J9VM - 20101129_69669_bHdSMr
    JIT - 20100623_16197ifx1_r8
    GC - 20100211_AA)
    JCL - 20110208
    Regards
    Haris
    Edited by: user12848704 on Feb 10, 2012 3:27 AM

  • Help with "Exception in thread "Thread-4" java.lang.NullPointerException"

    I am new to Java and I am trying a simple bouncing ball example from Stanford. Here is their simple example that works.
    import acm.program.*;
    import acm.graphics.*;
    import java.awt.*;
    public class BouncingBallWorking extends GraphicsProgram {
    /** sets diameter */
    private static final int DIAM_BALL = 30;
    /** amount y velocity is increased each cycle */
    private static final double GRAVITY = 3;
    /** Animation delay or pause time between ball moves */
    private static final int DELAY = 50;
    /** Initial X and Y location ball*/
    private static final double X_START = DIAM_BALL / 2;
    private static final double Y_START = 100;
    private static final double X_VEL = 3;
    private static final double BOUNCE_REDUCE = 0.9;
    private double xVel = X_VEL;
    private double yVel = 0.0;
    private GOval BallA;
    public void run() {
    setup(X_START,Y_START);
    //         Simulation ends when ball goes off right hand
    //         end of screen
    while (BallA.getX() < getWidth()) {
    moveBall(BallA);
    checkForCollision(BallA);
    pause(DELAY);
    private void setup(double X_coor, double Y_coor) {
    BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
    add(BallA);
    private void moveBall(GOval BallObject) {
    yVel += GRAVITY;
    BallObject.move(xVel,yVel);
    private void checkForCollision(GOval BallObject) {
    if(BallObject.getY() > getHeight() - DIAM_BALL){
    yVel = - yVel * BOUNCE_REDUCE;
    double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
    BallObject.move(0, -2 * diff);
    } Now I am trying to modify "setup" so it I can create several balls. I made a simple modification to "setup" and now I am getting an error.
    "Exception in thread "Thread-4" java.lang.NullPointerException
    at BouncingBallNotWorking.run(BouncingBallNotWorking.java:36)
    at acm.program.Program.runHook(Program.java:1592)
    at acm.program.Program.startRun(Program.java:1581)
    at acm.program.AppletStarter.run(Program.java:1939)
    at java.lang.Thread.run(Unknown Source)"
    Can you describe why I am getting an error? Thanks.
    Here is what I changed.
    Before:
         private void setup(double X_coor, double Y_coor) {
              BallA = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
              add(BallA);
         }After:
         private void setup(double X_coor, double Y_coor, GOval BallObject) {
              BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
              add(BallObject);
         }Here is the complete code.
    * File:BouncingBall.java
    * This program graphically simulates a bouncing ball
    import acm.program.*;
    import acm.graphics.*;
    import java.awt.*;
    public class BouncingBallNotWorking extends GraphicsProgram {
    /** sets diameter */
    private static final int DIAM_BALL = 30;
    /** amount y velocity is increased each cycle */
    private static final double GRAVITY = 3;
    /** Animation delay or pause time between ball moves */
    private static final int DELAY = 50;
    /** Initial X and Y location ball*/
    private static final double X_START = DIAM_BALL / 2;
    private static final double Y_START = 100;
    private static final double X_VEL = 3;
    private static final double BOUNCE_REDUCE = 0.9;
    private double xVel = X_VEL;
    private double yVel = 0.0;
    private GOval BallA;
    public void run() {
    setup(X_START,Y_START, BallA);
    //         Simulation ends when ball goes off right hand
    //         end of screen
    while (BallA.getX() < getWidth()) {
    moveBall(BallA);
    checkForCollision(BallA);
    pause(DELAY);
    private void setup(double X_coor, double Y_coor, GOval BallObject) {
    BallObject = new GOval(X_coor, Y_coor, DIAM_BALL, DIAM_BALL);
    add(BallObject);
    private void moveBall(GOval BallObject) {
    yVel += GRAVITY;
    BallObject.move(xVel,yVel);
    private void checkForCollision(GOval BallObject) {
    if(BallObject.getY() > getHeight() - DIAM_BALL){
    yVel = - yVel * BOUNCE_REDUCE;
    double diff = BallObject.getY() - (getHeight() - DIAM_BALL);
    BallObject.move(0, -2 * diff);
    } Edited by: TiredRyan on Mar 19, 2010 1:47 AM

    TiredRyan wrote:
    That is great! Thanks. I've got two question though.
    1.) Now I want to have 100 bouncing balls. Is the best way to achieve this is through an array of GOvals? I haven't gotten to the lecture on arrays on Stanford's ITunesU site yet so I am not sure what is possible with what I know now.An array would work, or a List. But it doesn't matter much in this case.
    2.) Are references being passed by value only applicable to Java or is that common to object-oriented programming? Also is there a way to force Java to pass in "BallA" instead of the value "null"?I can't say about all OO languages as a whole, but at least C++ can pass by reference.
    And no, there's no way to pass a reference to the BallA variable, so the method would initialize it and it wouldn't be null anymore.
    When you call the method with your BallA variable, the value of the variable is examined and it's passed to the method. So you can't pass the name of a variable where you'd want to store some object you created in the method.
    But you don't need to either, so there's no harm done.

  • Exception in thread "Thread-6" java.lang.UnsatisfiedLinkError: no cis

    Hi All,
    I got an error when I run SunONE 7 (final) on Solaris spark)
    as below. I do not get this error when I run SunONE 7 on
    Windows.
    I was access ejbs from a stand-a-lone Java application.
    What was wrong?
    Any information would be appreciated.
    Thanks in advance.
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Exception in thread "Thread-6" java.lang.UnsatisfiedLinkError: no cis in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1403)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:832)
         at com.iplanet.ias.cis.connection.EndPoint.<clinit>(EndPoint.java:254)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.createListener(GIOPImpl.java:369)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getEndpoint(GIOPImpl.java:316)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.initEndpoints(GIOPImpl.java:149)
         at com.sun.corba.ee.internal.POA.POAORB.getServerEndpoint(POAORB.java:505)
         at com.sun.corba.ee.internal.POA.POAImpl.pre_initialize(POAImpl.java:157)
         at com.sun.corba.ee.internal.POA.POAImpl.<init>(POAImpl.java:115)
         at com.sun.corba.ee.internal.POA.POAORB.makeRootPOA(POAORB.java:115)
         at com.sun.corba.ee.internal.POA.POAORB$1.evaluate(POAORB.java:133)
         at com.sun.corba.ee.internal.core.Future.evaluate(Future.java:26)
         at com.sun.corba.ee.internal.corba.ORB.resolveInitialReference(ORB.java:3069)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3004)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:31)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:175)
         at com.sun.ejb.portable.HomeHandleImpl.readObject(HomeHandleImpl.java:60)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:939)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:850)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:842)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_abstract_interface(CDRInputStream.java:309)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:228)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
         at com.sun.ejb.portable.EJBMetaDataImpl.readObject(EJBMetaDataImpl.java:112)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1075)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at examples._CasinoWithLoggingExampleHome_Stub.getEJBMetaData(Unknown Source)
         at com.acelet.s.Envoy.parseContext(Envoy.java:365)
         at com.acelet.s.Envoy.getJndiToRemoteInfoHashtable(Envoy.java:217)
         at com.acelet.s.peekPoke.EnvoyGetJndiToRemoteInfoHashtable.run(EnvoyGetJndiToRemoteInfoHashtable.java:33)
         at java.lang.Thread.run(Thread.java:536)
    Exception in thread "Thread-6" org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Serializable readObject method failed internally vmcid: SUN minor code: 211 completed: Maybe
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:944)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:850)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_abstract_interface(CDRInputStream_1_0.java:842)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_abstract_interface(CDRInputStream.java:309)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObjectDelegate(IIOPInputStream.java:228)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObjectOverride(IIOPInputStream.java:381)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:318)
         at com.sun.ejb.portable.EJBMetaDataImpl.readObject(EJBMetaDataImpl.java:112)
         at com.sun.corba.se.internal.io.IIOPInputStream.readObject(Native Method)
         at com.sun.corba.se.internal.io.IIOPInputStream.invokeObjectReader(IIOPInputStream.java:1298)
         at com.sun.corba.se.internal.io.IIOPInputStream.inputObject(IIOPInputStream.java:908)
         at com.sun.corba.se.internal.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:261)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:247)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:209)
         at com.sun.corba.se.internal.iiop.CDRInputStream_1_0.read_value(CDRInputStream_1_0.java:1075)
         at com.sun.corba.se.internal.iiop.CDRInputStream.read_value(CDRInputStream.java:293)
         at examples._CasinoWithLoggingExampleHome_Stub.getEJBMetaData(Unknown Source)
         at com.acelet.s.Envoy.parseContext(Envoy.java:365)
         at com.acelet.s.Envoy.getJndiToRemoteInfoHashtable(Envoy.java:217)
         at com.acelet.s.peekPoke.EnvoyGetJndiToRemoteInfoHashtable.run(EnvoyGetJndiToRemoteInfoHashtable.java:33)
         at java.lang.Thread.run(Thread.java:536)
    Cannot get home object for jndi name: examples.CasinoWithLoggingExampleHome
    :java.rmi.MarshalException: CORBA MARSHAL 1398079699 Maybe; nested exception is:
         org.omg.CORBA.MARSHAL: Unable to read value from underlying bridge : Serializable readObject method failed internally vmcid: SUN minor code: 211 completed: Maybe
    Cannot get home object for jndi name: examples.CasinoWithLoggingExampleHome
    Is client jar on CLASSPATH or installed onto Super?
    Cannot get home object for jndi name: examples.CasinoWithLoggingExampleHome
    :java.lang.NullPointerException
    Exception in thread "Thread-6" java.lang.StackOverflowError
         at com.sun.corba.ee.internal.corba.ORB.<init>(ORB.java:263)
         at com.sun.corba.ee.internal.iiop.ORB.<init>(ORB.java:102)
         at com.sun.corba.ee.internal.POA.POAORB.<init>(POAORB.java:126)
         at com.sun.corba.ee.internal.Interceptors.PIORB.<init>(PIORB.java:207)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.<init>(TxPIORB.java:82)
         at com.sun.enterprise.iiop.POAEJBORB.<init>(POAEJBORB.java:122)
         at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at java.lang.Class.newInstance0(Class.java:306)
         at java.lang.Class.newInstance(Class.java:259)
         at org.omg.CORBA.ORB.create_impl(ORB.java:295)
         at org.omg.CORBA.ORB.init(ORB.java:336)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iiop.IIOPSSLSocketFactory.getEndPointInfo(IIOPSSLSocketFactory.java:288)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:81)
         at com.sun.corba.ee.internal.iiop.ConnectionTable.getConnection(ConnectionTable.java:76)
         at com.sun.corba.ee.internal.iiop.GIOPImpl.getConnection(GIOPImpl.java:80)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:685)
         at com.sun.corba.ee.internal.corba.ClientDelegate.createRequest(ClientDelegate.java:621)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve(InitialNamingClient.java:1155)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolveUsingBootstrapProtocol(InitialNamingClient.java:823)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.cachedInitialReferences(InitialNamingClient.java:1245)
         at com.sun.corba.ee.internal.corba.InitialNamingClient.resolve_initial_references(InitialNamingClient.java:1129)
         at com.sun.corba.ee.internal.corba.ORB.resolve_initial_references(ORB.java:3006)
         at com.sun.jts.CosTransactions.DefaultTransactionService.createPOAs(DefaultTransactionService.java:309)
         at com.sun.jts.CosTransactions.DefaultTransactionService.identify_ORB(DefaultTransactionService.java:180)
         at com.sun.corba.ee.internal.TxPOA.TxPIORB.initServices(TxPIORB.java:134)
         at com.sun.enterprise.iiop.POAEJBORB.initServices(POAEJBORB.java:475)
         at com.sun.corba.ee.internal.POA.POAORB.initPostProcessing(POAORB.java:355)
         at com.sun.corba.ee.internal.Interceptors.PIORB.initPostProcessing(PIORB.java:236)
         at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:193)
         at com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:337)
         at org.omg.CORBA.ORB.init(ORB.java:337)
         at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:355)
         at com.sun.enterprise.util.ORBManager.init(ORBManager.java:257)
         at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:275)
         at com.sun.enterprise.iiop.security.SecurityMechanismSelector.<init>(SecurityMechanismSelector.java:156)
         at com.sun.enterprise.iio

    Nelson_Garcia wrote:
    I think variable ourinfo (type SSRCInfo) has been set to null in class RTCPTransmitter in bye method. This method is executed due to the timeout event logged before the exception...but, why do i get that timeout event if it's supposed to be receiving the stream?You type that like you posted the output you're seeing when you run your program...but you didn't..so there's no way of answering that question.

  • SAP NetWeaver 7.01 ABAP Trial Version - Exceptioin in thread "Thread-51"

    Hello All I have tried 4 times to install SAPNW 7.01 ABAP Trial, but failed.
    The InstallShield Wizard returns an error:
    Exceptioin in thread "Thread-51" com.installshield.database.ISSqlException: Table not found CONTROLEVENT in statement [SELECT ActionSequence_FROM ControlEvent WHERE
    Controlid_=51 AND EventType='buttonClicked'] [SELECT ActionSequence_FROM ControlEvent WHERE
    Controlid_=? AND EventType=?] caused by: java.sql.SQLException:
    Table not found CONTROLEVENT in Statement [SELECT ActionSequence_FROM ControlEvent WHERE
    Controlid_=51 AND EventType='buttonClicked']
           at com.installshield.database.TransactionProcessor.query(Unknown Source)
           at com.installshield.database.SQLProcessor.queryIntegers(Unknown Source)
           at com.installshield.database.designtime.ISControlEventDef.getActionSequence(Unknown Source)
           at com.installshield.database.runtime.impl.ISBaseEventImpl.getActionSequence(Unknown Source)
           at com.installshield.event.EventDispatcher.triggerEvent(Unknown Source)
           at com.installshield.event.EventDispatcher$BackgroundEventThread.run(Unknown Source)
    And the C:\SAP\NSP\log.txt:
    (Aug 7, 2009 1:07:26 PM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, An error occurred and product installation failed.  Look at the log file C:\SAP\NSP\log.txt for details.
    (Aug 7, 2009 1:07:26 PM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
    STACK_TRACE: 15
    ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.execute(StepWrapperInstallFiles.java:254)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllSteps(StepWrapperInstallFiles.java:224)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllInstallationSteps(StepWrapperInstallFiles.java:177)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.install(StepWrapperInstallFiles.java:268)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    (Aug 7, 2009 1:07:27 PM), Install, com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct, err, An error occurred and product uninstallation failed.  Look at the log file C:\SAP\NSP\log.txt for details.
    (Aug 7, 2009 1:07:27 PM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
    STACK_TRACE: 15
    ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.execute(StepWrapperInstallFiles.java:254)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllSteps(StepWrapperInstallFiles.java:224)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllUninstallationSteps(StepWrapperInstallFiles.java:192)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.uninstall(StepWrapperInstallFiles.java:313)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.uninstallProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.processActionsFailed(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    1.- I have installed the Loopback Adapter and
    2.- java_home=C:\Programme\Java\j2re1.4.2_16
    3.- before reinstalling everything, I have executed the RegCleanTool
    4.- I have Windows XP service pack 2
    and still the problem has not resolved.
    I need some help and I hope you can help me.
    Cheers
    Marcos

    Hi,
    I have dropped the NSP database and now I only get the following error after trying to install the trial version again:
    (Aug 7, 2009 2:09:59 PM), Install, com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct, err, An error occurred and product uninstallation failed.  Look at the log file C:\SAP\NSP\log.txt for details.
    (Aug 7, 2009 2:09:59 PM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
    STACK_TRACE: 15
    ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.execute(StepWrapperInstallFiles.java:254)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllSteps(StepWrapperInstallFiles.java:224)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllUninstallationSteps(StepWrapperInstallFiles.java:192)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.uninstall(StepWrapperInstallFiles.java:313)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.uninstallProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.processActionsFailed(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Cheers
    Marcos

  • Exception in thread "Thread-1" java.lang.NoClassDefFoundError:

    Hi
    When we are trying to deploy one of our application in Tomcat 5.0 we are seeing below error -
    - 18:58:51,721 [Thread-1] INFO (support.context.ApplicationContext) Done building hibernate session factory, time 21,296.396 ms
    Exception in thread "Thread-1" java.lang.NoClassDefFoundError: javax/transaction/Synchronization
    at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:212)
    at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
    java:437)
    at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
    java:461)
    at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.
    java:469)
    at com.splwg.base.support.context.ApplicationContext.newHibernateSession
    (ApplicationContext.java:264)
    at com.splwg.base.support.context.FrameworkSession.initialize(FrameworkS
    ession.java:175)
    at com.splwg.base.support.context.FrameworkSession.<init>(FrameworkSessi
    on.java:162)
    at com.splwg.base.support.context.ApplicationContext.createSession(Appli
    cationContext.java:255)
    at com.splwg.base.support.context.ApplicationContext.createThreadBoundSe
    ssion(ApplicationContext.java:298)
    at com.splwg.base.support.context.SessionExecutable.doInReadOnlySession(
    SessionExecutable.java:92)
    at com.splwg.base.support.context.SessionExecutable.doInReadOnlySession(
    SessionExecutable.java:75)
    at com.splwg.base.support.context.ApplicationContext.initialize(Applicat
    ionContext.java:157)
    at com.splwg.base.support.context.ContextFactory.buildContext(ContextFac
    tory.java:144)
    at com.splwg.base.support.context.ContextFactory.buildContext(ContextFac
    tory.java:65)
    at com.splwg.base.support.context.ContextFactory.createDefaultContext(Co
    ntextFactory.java:426)
    at com.splwg.base.web.startup.DeferredXAIStartup.run(DeferredXAIStartup.
    java:59)
    at java.lang.Thread.run(Thread.java:595)
    Your pointers can help us.
    Thanks
    Manish

    Your classpath is probably wrong. You are missing the javax.transaction.Synchronization class/interface.
    Kaj

  • IOP00710309: (INTERNAL) Worker thread Thread[p: default-threadpool; w: Idle,5,ORB ThreadGroup 0] caught throwable com.sun.corba.se.impl.orbutil.threadpool

    Hi ,
    I am seeing this issue while starting my managed server.
    com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread run
    FINE: "IOP00710309: (INTERNAL) Worker thread Thread[p: default-threadpool; w: Idle,5,ORB ThreadGroup 0] caught throwable com.sun.corba.se.impl.orbutil.threadpool.TimeoutException when requesting work from work queue default-workqueue."
    org.omg.CORBA.INTERNAL:   vmcid: SUN  minor code: 309  completed: No
            at com.sun.corba.se.impl.logging.ORBUtilSystemException.workerThreadThrowableFromRequestWork(ORBUtilSystemException.java:6330)
            at com.sun.corba.se.impl.logging.ORBUtilSystemException.workerThreadThrowableFromRequestWork(ORBUtilSystemException.java:6355)
            at com.sun.corba.se.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:494
    I have searched the net for this but didnt find any resolution. Please help.
    Regards,
    Rishi

    This became bug 6560301. And Sun pointed out that it was my bad in not handling spurious wakeups. Java 6 makes spurious wakeups more likely. (My experience is from "never" to "sometimes".)
    More info at:
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6560301

  • Uncaught exception : Application Registry.getOrWait for (0x7c802411365c3985) owner died Thread [thread- 86830080,5]

    hi,
    Since yesterday my Blackberry has stopped working. I tried rebooting several tomes but whenever i reboot it and the BB gets hanged
    "Uncaught exception : Application Registry.getOrWait for (0x7c802411365c3985) owner died Thread [thread- 86830080,5]"
    Can any1 help me with the possible solution

    akriti wrote:
    hi,
    Since yesterday my Blackberry has stopped working. I tried rebooting several tomes but whenever i reboot it and the BB gets hanged
    "Uncaught exception : Application Registry.getOrWait for (0x7c802411365c3985) owner died Thread [thread- 86830080,5]"
    Can any1 help me with the possible solution
    Hi akriti,
    Reset your BlackBerry to factory settings. Read this Article.
    How to reset the BlackBerry smartphone to factory defaults
    Hope it helps.
    Good luck!
    Please thank those who help you by clicking the button.
    If your issue has been solved, please resolve it by marking "Accept as Solution"

  • Uncaught exception: applicationRegistry.getorwaitfor (0x7c802477365c3985) owner died thread [thread-388973568,5]

    my blackberry curve 8520 shows the below message
    uncaught exception: applicationRegistry.getorwaitfor (0x7c802477365c3985) owner died thread [thread-388973568,5]
    so i can'y recieve or do any phone calls
    also when i tried to reinstall the software it keeps telling me to check my internet connection even when i'm connecting to it, so what should i do to fix my blackberry or to reinstal the software

    Hi there,
    I would reload the software like you're trying to do. Try using the method described in the following link:
    http://supportforums.blackberry.com/t5/Device-software-for-BlackBerry/How-To-Reload-Your-Operating-S...
    Also, if needed, before running the Loader.exe file in Step 2, delete the file named Vendor.xml, located in the same folder. If you continue to see the internet connection message, let me know, but one other thing you can try is unplugging your computer from the internet once you've downloaded and installed the installer file for your OS.
    Good luck and I hope this info helps!
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

  • Thread safety: exposing "this" via a "static" reference  in constructor

    please consider:
    public class Foo  {
      public static List<Foo> list = new ArrayList<Foo>();
      public int i = 1;
      Foo() {
        Foo.list.add(this);
        i++;
        // ...... other stuff that does not effect "i"
    }Exiting, I want "i" to always be 2. But what if a thread got the reference to "this" from the static List before the constructor exited and did:
    ((Foo) Foo.list.get(0)).i++;Is the only solution a synchronized wrapper for "list"?
    Thanks.

    A synchronized wrapper is not sufficient:
    public static List<Foo> list = Collections.synchronizedList(new ArrayList<Foo>());This is because the list is now thread-safe, but what about the items in it?
    Look at your constructor:
    Foo.list.add(this);
    i++;Another thread could access the list in between the execution of these two lines and see the value of i before i is incremented.

  • Starting threads in constructors

    Hi,
    This is kind of a general question. I have a class which initializes a thread within a constructor. e.g.,
    Class A {
             //Initialize thread prerequisites
            String name;
             Thread th;
           classConstructor(String threadName){
                    name = threadName;
                    th = new Thread(this, name);
                    System.out.println( "New Thread: " +th);          
                    th.start() ;
    }Is this the right way of using threads? Or should threads be started from the main method? What are the merits/demerits in these two approaches?
    Thanks!

    You can start threads from anywhere. After all, you're just creating another Java object and calling the start method on it.
    However, there are places where you shouldn't start threads. Unfortunately, in constructors of non-final classes is one of those places. And here's why...
    If you subclass your class, the subclass constructor will begin by calling one of the constructors in your class (either implicitly or explicitly). In this case, your constructor will create and begin a thread. That thread could potentially call methods on this new object instance (especially as in your case you have passed this to the thread, so it looks likely that it will). The problem is, because we're talking about threads, the thread might call the methods on your class before your constructor or the subclass constructor has completed, and you would therefore be calling methods on an incomplete object which might cause issues.
    For example:
    public abstract class A {
      public A() {
        // create and start thread here
      public abstract int getSomething();
    public class B extends A {
      private static int something;
      public B() {
        // implicitly calls A()
        something = 1;
      public int getSomething() {
        return something;
    }Now, if the thread you started calls getSomething(), the return value might be 0, or it might be 1, depending on how the thread executes in relation to the original thread which is executing the constructors.

  • Are Static methods Thread safe?

    Hello All
    I have a static method that takes a integer and returns a mathematically processed result.
    Since this method is frequently required, I have placed it in a common class and declared it as static.
    I want to know whether this method is thread safe?

    There's nothing special about static methods, with regard to thread safety. If they access shared objects, then such access will usually need to be controlled by synchronisation; this might be on the object being accessed, some higher-level object or a special object allocated purely as a lock. The only way that you might think of them as special is that there's no instance of the Class on which you can synchronise.
    You can declare a static method as synchronised. If you do, it will be synchronised on the single Class object of the class in which it is declared. This means that only one thread can be executing any part of the method at any one time. However, I understand that the Java Runtime itself sometimes synchronises on this Class object for its own reasons, therefore you might sometimes find a synchronised static method blocks when no other thread is executing it. Usually better, therefore, to explicitly synchronise on some object or other, than to use synchronised static methods.

  • Are static objects thread safe?

    hi,
    i have seen code that looks like this:
    private static TestObject _to;
    static {
    _to = new TestObject();
    if methods within TestObject contain local variables, will local variables inside _to be threadsafe when hit by 2 requests?
    eg.
    User 1 makes a request to:
    _to.setStuff("abc");
    User 2 make a request to:
    _to.setStuff("def");
    Will User 1's now see "def" instead of "abc"?
    thanks
    - Edward Han
    [email protected]

    so what happens to the local variable holder? if 2
    people access the static variable _to and call
    setStuff() one right after the other, is there a
    chance that the first person in will print out what
    the second person in set as the holder?
    Local variables are thread specific and live on an execution stack, and each thread gets its own stack. If there are two threads, there are two stacks, and if both threads are "in" setstuff(), there are two distinct references called "holder" -- one per stack. And regardless of the order in which the threads enter that method, the references themselves are not clobbered. Now, what you see printed is an entirely different issue, as is the case if the "holder" references point to the same (shared) object.
    The key is this: a thread-specific resource is thread safe; a shared (unprotected and/or mutable) resource is not.

  • SingleThreadModel-static variables thread safe?

    Hi..
    I have one servlet which implements SingleThreadModel.My servlet contains two static variables .
    public class MyServlet extends HttpServlet
    implements SingleThreadModel {
    private static String firstName="Umar hathab";
    private static StringBuffer lastName= new StringBuffer("Abdullah");
    I want to know whether this two variables will be thread safe? I know that static vars are shared in JVM..
    Please help me..
    Thanks in advance..
    A.Umar

    Hi heyad..
    Static variables are shared among the instances.When we create two instances of an object which contains a static variable,both the instances share the same static variable.So there will be data corruption when two instances operate on the static variable at the same time.So I feel static variables are not thread safe.What I want to know is whether static variables are thread-safe when implemented by SingleThreadModel..
    A.Umar

  • Another static problem thread - Soundblaster Audigy 2

    I have read through many many topics about people have problems with the Audigy 2 ZS's I have tried many solutions people have had that fixed their problem or at least helped it nothing has worked yet.
    Here is my problem, I get static while I play games coming through my speakers or headphones whatever I am using. The static isnt as bad with some games but it usually starts 5 minutes into the game it varies by game shorter or longer, but after it starts it gets worse, louder and more persistant as time goes on. It gets to a point where its just unbereable all I can hear is just static. After I exit the game and listen to music or something the static will go away after about 5 minutes or so. The static is only present when there is sound being played. Also I never hear static just from playing music, always from playing games. I have tried using different PCI slots on my motherboard, uninstalling and reinstalling the drivers from the disc and from the website. Tried turning certain options off that some people found to help but nothing helps me. Now my card has not always had this problem, it started about 7 months after purchase just out of the blue.
    I had emailed the Creative support, but apparently they dont offer any support after 60 days of owning the card, the email said to try the forums or buy a tutor for 3 bucks for every 30 minutes. I figured I would try the forums first.
    My specs are:
    AMD Athlon 64 3000+
    K8N Neo4 Platinum MSI Motherboard
    XFX GeForce 6600 GT
    WD 80 gig hard dri've

    WOW what a horrible card. Absolute garbage.

Maybe you are looking for