Unique id for calling thread

A stored proc can be called by any of the say 200 threads from within a pool of java connections that all sign on with say USER1. Another similar pool can call the same proc that are signed on with USER2. Inside the proc I need to store some SYS_CONTEXT info and retrive it within the same call. I cannot use a package HEADER variable beacuse this is not private to the thread. I cannot use a global variable in the package BODY because between storing the value in the BDY global variable and retrieving it another thread can call the same proc and access the BODY global variable.
I decide to store in the info ina SYS_CONTEXT using a unique identifier for this thread as the ATTRIBUTE and the info in the VALUE. To compose the unique id for this thread I can issue the following SQl. Which combo will guarantee me a unique id for tis thread that called the stored proc. The calls are synchronous meaning once a thread obtains a connection from the pool to call the stored proc it does not give it up until the proc completes and returns a result to the thread.
SELECT
SYS_CONTEXT('USERENV','SESSIONID')
,SYS_CONTEXT('USERENV','SESSION_USER')
,SYS_CONTEXT('USERENV','SESSION_USERID')
, ,SYS_CONTEXT('USERENV','SID')
,SYS_CONTEXT('USERENV','HOST')
,SYS_CONTEXT('USERENV','INSTANCE')
INTO
v_sessionid
,v_session_user
,v_session_userid
,v_host
,v_instance
FROM
DUAL
;

Please don't abuse the forums by posting in many places.
General Database Discussions

Similar Messages

  • Does a reentrant dll call monopolize the calling thread?

    If I understand thing correctly, threading for a dll call is the same as threading for a vi whose execution priority is set to subroutine.
    To review threading in subvis:
    (1) the thread in which a subroutine-execution-priorty-vi call is made is monopolized by the subroutine-execution-priorty-vi since labview cannot time slice the thread.
    (2) if the subroutine-execution-priority-vi is not reentrant, then other threads that call the vi may be suspended because they are competing for the same code resource.
    (3) if the subroutine-execution-priority-vi is reentrant, then other threads may call the vi simultaneously. However, within any particular thread the vi must complete because of point (1).
    In
    sum, the OS timeslices between the threads, and labVIEW timeslices within the threads. If a vi's execution priority is set to subroutine, then the thread under which it is running is monopolized by the vi. Yes?
    A reentrant dll call would be equivalent to a reentrant subvi call in which the subvi's execution priority is set to subroutine. Yes?
    If the above is correct then this should also be correct:
    Using an API call to return the thread ID, you could use the the thread ID at the front and back side of a dll call, as well as in a message library function callable from a dll, to theoretically message labVIEW upon the dll return. The message would be uniquely identifiable because a dll call cannot be superceded by another dll call from within the same thread. Yes?
    I'm not saying that it would be particularly efficient to do so, only that it could be done. And depending on the messaging, it could be a useful option in the dll call configuration dialog box.
    In consider
    ation of "magic",
    Kind Regards,
    Eric

    Eric,
    I'm not sure I understand exactlly what you are trying to do here.
    If you want LV to react to a dll error, why don't you just pass a return
    code that's not zero? Then, back in LV, read the return code. If it's not
    zero, create an error, and pass this to the rest of the code. The rest of
    the code is (or should, following good programming practise) has an error
    in, and the code will not execute if the input error is TRUE. It does not
    even have to be the return code, it could be any input value. The input
    values can be changed in the code, and the modified value is returnd to
    LabVIEW.
    If you want to generate an error, and put it into a buffer to be read later
    on in LV, you'll have to synchronise the code. This is the consequence for a
    construction like this, and is the same for several windows API's
    (GetLastError, etc.). the buffer will stay in memory, untill all instances
    of the dll are released from LV memory.
    BTW: A dll could create another thread. This thread can run on the
    background, like the good old TRS's in dos. (A thread like this could even
    call a LabVIEW VI that is build in a dll, just like any other api.)
    BTW: A thread created by a dll can be made to be automatically released when
    the thread is detatched, or when the process is detached. This is important,
    because LV will crash if the dll is removed from memory, but the thread is
    not stopped properly.
    Regards,
    Wiebe.
    "Eric6756" wrote in message
    news:[email protected]...
    > Greg,
    >
    > As I think I lost you in the point of this line of questions, let me
    > back up.
    >
    > A couple of week ago I asked the following question, "Is there a
    > labVIEW library call that can be made from a dll to tell labVIEW to
    > abort the calling vi thread?" To that question you made the following
    > statement:
    >
    > "... and I doubt that there is a function to do that from a DLL as the
    > DLL could be arbitrarily deep down the stack and the function called
    > would have to magically find the VI that it wants to abort. And don't
    > forget that DLLs can be called by multiple VIs at the same time."
    >
    > You seem to be saying here that what I'm asking for is not possible.
    > And having thought about this for a while, I didn't understand why
    > not.
    >
    > For the moment I'm going to ignore the caveat you just put into the
    > dll calling presumptions I've made and assume the dll is going to
    > execute synchronously within a thread. As the original question
    > suggests, the objective here is to message labVIEW from a dll to
    > provide the same functionallity as a CIN, namely return an error code
    > to labVIEW from a dll.
    >
    > A library function could do this as follows:
    >
    > First, the library function would have two modes; set error, and
    > return error
    >
    > (1) set error:
    >
    > 1.1 get the set error caller thread ID from API
    > 1.2 get the passed in error
    > 1.3 store the error and associated thread ID locally
    >
    > (2) return error
    > 2.1 get return error caller thread ID from API
    > 2.2 locate the error, if any, associated with thread ID
    > 2.3 return the error and clear it locally
    >
    > Now, if a dll encountered an error that it wanted labview to deal
    > with, it would call the error function to set the error code. When
    > the dll call returns control to labVIEW, labVIEW could call the
    > function to return the error. This of course works only if the dll
    > call is synchronous within a thread. Obviously, if the dll releases
    > the thread before it returns, then more than one dll call can be made
    > from the thread and the presumption that an error could be uniquely
    > associated with a thread is itself an error.
    >
    > Having looked at your reply again, I think though your answering a
    > different question than I asked. I just wanted a function to message
    > labVIEW to abort the vi chain, I don't want to abort a vi chain from
    > within the dll. It is a feature of CIN calls which I wanted in dll
    > calls.
    >
    > That a dll call may not be synchronous within a thread throws a wrench
    > in the works. Apparently I've just chased down a dead end.
    >
    > Hey, but thanks for the wrench...
    > Kind Regards,
    > Eric

  • No externally managed transaction is currently active for this thread

    Got the following exception after updating an entity bean and call persist method. Code the given below the exception.
    Exception [TOPLINK-23010] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.TransactionException
    Exception Description: No externally managed transaction is currently active for this thread
    public Object persistEntity(Object entity) {
    em.flush();
    em.persist(entity);
    return entity;
    private void modifyUser (Iuser user, String newHandle, Hashtable userDetails) throws UnknownException, WarningException {
    if (user == null) {
    throw new WarningException (new CatalogHelper("ITOOLS_000015", "to modify a user"));
    boolean handleUpdate = false;
    if ((newHandle != null) && !newHandle.equals("^\\s*$")) {
    handleUpdate = true;
    String oldHandle = user.getUserhandle();
    if (handleUpdate && oldHandle.equalsIgnoreCase(newHandle)) {
    handleUpdate = false;
    if (!handleUpdate && (userDetails == null) || (userDetails.size() == 0)) {
    return;
    if (handleUpdate) {
    userDetails.put("userhandle", newHandle);
    IToolsUtil.validateInputData("iuser", userDetails, false);
    if (handleUpdate) {
    userDetails.remove("userhandle");
    System.out.println("handleUpdate " + handleUpdate);
    // For User admin, handle, isactive, isadmin cannot be changed.
    if (oldHandle.equals("admin")) {
    if (handleUpdate) {
    throw new WarningException (new CatalogHelper("ITOOLS_000045", "Handle"));
    String active = (String)userDetails.get("isactive");
    if ((active != null) && !active.equals("Yes")) {
    throw new WarningException (new CatalogHelper("ITOOLS_000045", "Is Active"));
    String admin = (String)userDetails.get("isadmin");
    if ((admin != null) && !admin.equals("Yes")) {
    throw new WarningException (new CatalogHelper("ITOOLS_000045", "Is Admin"));
    System.out.println("user transaction started");
    if (handleUpdate) {
    FinderMethods fm = new FinderMethods();
    try {
    fm.findByUserHandle(em, newHandle);
    throw new WarningException (new CatalogHelper("ITOOLS_000043", newHandle));
    } catch (ObjectNotFoundException onfe) {
    user.setUserhandle(newHandle);
    System.out.println("User handle modified");
    } catch (SQLException se) {
    se.printStackTrace();
    throw new UnknownException (new CatalogHelper("ITOOLS_100000", new Object[]{"modifyUser", se.getMessage()}));
    String lname = (String)userDetails.get("userlname");
    if (lname != null) {
    user.setUserlname(lname);
    String fname = (String)userDetails.get("userfname");
    if (fname != null) {
    user.setUserfname(fname);
    String email = (String)userDetails.get("useremail");
    if (email != null) {
    user.setUseremail(email);
    String passwd = (String)userDetails.get("userpasswd");
    if (passwd != null) {
    user.setUserpasswd(passwd);
    String active = (String)userDetails.get("isactive");
    if (active != null) {
    user.setIsactive(active);
    String admin = (String)userDetails.get("isadmin");
    if (admin != null) {
    user.setIsactive(admin);
    System.out.println("details are updated");
    persistEntity(user);
    System.out.println("committed");
    How to resolve this issue? I am using Jdeveloper 10.1.3.0.4 (SU4)
    regds
    -raju

    The stack trace is given below. This exception is occured at "em.flush()" method. I even tried removing em.flush() method. Even then I got the same exception.
    I tried a different way of overcome this problem. Used UserTransaction instance say "ut" before create / modify the entity bean and later comitted. In that case I am not getting any exceptions. However, commit is happening only when new instance is created, commit works, but modification of an existing instance, commit is not working. Looks like there is some serious problem with EJB 3.0 in OC4J. Basic functionality is not working.
    Stack trace when flush method is called:
    Local Exception Stack:
    Exception [TOPLINK-23010] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.TransactionException
    Exception Description: No externally managed transaction is currently active for this thread
         at oracle.toplink.exceptions.TransactionException.externalTransactionNotActive(TransactionException.java:98)
         at oracle.toplink.internal.ejb.cmp3.transaction.base.JTATransactionWrapper.checkForTransaction(JTATransactionWrapper.java:39)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.checkForTransaction(EntityManagerImpl.java:322)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.getActiveUnitOfWork(EntityManagerImpl.java:314)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.flush(EntityManagerImpl.java:164)
         at com.itools.vs.model.session.AdminSessionBean.persistEntity(AdminSessionBean.java:57)
         at com.itools.vs.model.session.AdminSessionBean.createUser(AdminSessionBean.java:124)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    Stack trace when persist method is called:
    Local Exception Stack:
    Exception [TOPLINK-23010] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.TransactionException
    Exception Description: No externally managed transaction is currently active for this thread
         at oracle.toplink.exceptions.TransactionException.externalTransactionNotActive(TransactionException.java:98)
         at oracle.toplink.internal.ejb.cmp3.transaction.base.JTATransactionWrapper.checkForTransaction(JTATransactionWrapper.java:39)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.checkForTransaction(EntityManagerImpl.java:322)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.getActiveUnitOfWork(EntityManagerImpl.java:314)
         at oracle.toplink.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:74)
         at com.itools.vs.model.session.AdminSessionBean.persistEntity(AdminSessionBean.java:57)
         at com.itools.vs.model.session.AdminSessionBean.createUser(AdminSessionBean.java:123)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.evermind.server.rmi.RmiMethodCall.run(RmiMethodCall.java:53)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)

  • Being billed for calls I shouldn't be

    Hello,
    I have been receiving bills for a while which seem higher than I should. I have free evening and weekend calls on my account, and last month paid for calls on sundays and a monday evening. I also have a list of calls on my bill that do not correspond to any numbers I know, and a couple of calls seem to have been made when there was nobody in the house.
    Is it possible that somebody else is using my phoneline? Is there a number I can call to sort this out?
    Thanks,
    Simo

    Hi Simo
    I'll be happy to have a look at the call charges for you and see what's up. 
    Can you send me in an email please with your BT account and telephone number please with a link back to this thread.  If you get me a list of the numbers and charges you don't think apply I'll double check them.
    Just send to [email protected]
    Cheers
    Craig
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)”
    td-p/30">Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • Registering for Caller Display. Do I need to?

    Quick history:
    Mod on this forum arranges new deal for me for combined Infinity/Call package.
    I agree to new deal on condition that I get everything on my account as it was.
    New contract starts (Broadband/Calls/Line Rental) on 10th of September 2013.
    My Call Package includes BT Privacy, etc. at no extra cost. See pic below...
    A few days later news breaks that BT intend to start charging for the same calling features.
    I write to the Mod asking if I will have to start paying the fee for these services. He doesn't reply. Eventually I get a reply (obviously automated) telling me the info is on the website, and links to same.
    I write back asking for a proper reply to my question; this time I get a reply from 'Yunus', but it doesn't answer the question, (he only confirms that line rental will go up 6.4%), so I try other means.
    I use the price increase checker linked to on the other thread here; it tells me the Infinity/Calls Package will go up, but there is no mention of any changes to my Calling Features prices.
    I try Live Chat; holy sh!t, these people are useless! Are they paid to just tell you want to hear?
    First guy tells me 'no increase' in any of my prices';
    second guy says line rental going up, Infinity going up, but caller features package will not go up as they were included free in the package I signed up for with the Mod here
    third, it's a girl; she says everything will go up, and if I choose to leave I need to pay a full year's charges for cancelling.
    Plainly, they are not all correct.
    All I want to know is, what is going up? When? Do I have to sign up/pre-register for this free year's Caller Display thing? Won't that mean my contracts for BB/Calls, and Line Rental will have different end dates?
    I have read the big long thread about the rises, so do not require a repeat of the answers given there as most of them contradict each other anyway, just like Live Chat.
    It would be helpful to get a reply from a Mod (preferably the one who signed me up to this new contract in the first place) and not from any of the BT 'groupies'.
    Thanks.
    Incidentally, I've not had any letter or e-mail informing me of the price rises at all.
    I'm a Private person; I respect those who respect my Privacy.

    DavidM wrote:
    Hi Old_Bear,
    Thanks for posting. Not sure what you mean by BT 'groupies' but you can check if you're directly affected by the pricing change by entering your details here.
    Cheers
    David
    Hi David
    Old_Bear wrote: 
    I use the price increase checker linked to on the other thread here; it tells me the Infinity/Calls Package will go up, but there is no mention of any changes to my Calling Features prices.
    Been there, done that!
    Also spoke to Live Chat - pretty useless!
    My questions were:
    What else will go up?
    Will I start being charged for caller display, etc. when they are clearly included free as part of the package I agreed to sign up for with your colleague?
    Do I have to sign up/pre-register to get it for free when BT do start charging?
    Will this mean my Line Rental and BB/Calls contracts will have different end dates?
    I only want a straight answer to my questions; Customer Service have so far given me 5 different answers.
    I'm a Private person; I respect those who respect my Privacy.

  • Java Logger incrementing thread ids for a thread spawnned via JNI

    Hi all,
    I have a Java Logger object that I am passing to a JNI dll written in C++.
    If I spawn a thread from the JNI dll and log from that thread, the thread id in the log file increments for each log entry.
    To test this I wrote an infinite loop on the thread to make sure that the logging originated from a single thread. The thread id keeps incrementing in the log and the memory usage of the process increases too. However, the thread count in Task Manager does not increase.
    I will let the process run overnight to determine if the thread id will overflow or if an out of memory exception occurs.
    Has anyone else seen this behavior? Does anyone know what I might be doing wrong? I'm using jre 1.5.1.
    Thanks,
    William

    (1)
    has anybody ever tried to use a native library from
    JNI, when the library (Windows DLL) is not thread safe?
    Now we want many Java clients.
    That would mean each client makes its calls
    to the library in its own thread. Because the library
    is not thread safe, this would cause problems.Right. And therefore you have to encapsulate the DLL behind a properly synchronized interface class.
    Now the details of how you have to do that depends: (a) does the DLL contain state information other than TLS? (b) do you know which methods are not thread-safe?
    Depending on (a), (b) two extremes are both possible:
    One extreme would be to get an instance of the interface to the DLL from a factory method you'll have to write, where the factory method will block until it can give you "the DLL". Every client thread would obtain "the DLL", then use it, then release it. That would make the whole thing a "client-driven" "dedicated" server. If a client forgets to release the DLL, everybody else is going to be locked out. :-(
    The other extreme would be just to mirror the DLL methods, and mark the relevant ones as synchronized. That should be doable if (a) is false, and (b) is true.
    (2)
    Now we discussed to load the library several times -
    separately for each client (for each thread).
    Is this possible at all? How can we do that?
    And do you think we can solve the problem in this
    way?The DLL is going to be mapped into the process address space on first usage. More Java threads just means adding more references to the same DLL instance.
    That would not result in thread-safe behavior.

  • Stack size for native thread attaching to JVM

    All:
    I have a native thread (see below, FailoverCallbackThread) that attaches to the JVM and does a Java call through JNI. The stack size for the native thread is 256KB.
    at psiUserStackBangNow+112()@0x20000000007a96d0
    at psiGuessUserStackBounds+320()@0x20000000007a8940
    at psiGuessStackBounds+48()@0x20000000007a8f60
    at psiGetPlatformStackInfo+336()@0x20000000007a9110
    at psiGetStackInfo+160()@0x20000000007a8b40
    at psSetupStackInfo+48()@0x20000000007a5e00
    at vmtiAttachToVMThread+208()@0x20000000007c88b0
    at tsAttachCurrentThread+896()@0x20000000007ca500
    at attachThread+304()@0x2000000000751940
    at genericACFConnectionCallback+400(JdbcOdbc.c:4624)@0x104b1bc10
    at FailoverCallbackThread+512(vocctx.cpp:688)@0x104b8ddc0
    at start_thread+352()@0x20000000001457f0
    at __clone2+208()@0x200000000030b9f0
    This causes stack overflow in Oracle JRockit JVM. (It does not cause overflow with Oracle Sun JDK.) Is there a recommended stack size for this use case for JRockit? Is there a way to compute it roughly?
    Platform Itanium 64 (linux)]
    java version "1.5.0_06"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
    BEA JRockit(R) (build R26.4.0-63-63688-1.5.0_06-20060626-2259-linux-ia64, )
    mp

    How do I found default heap size, stack size for the
    thread, number of threads per jvm/process supported ?The threads is OS, OS install and jvm version specific. That information is also not useful. If you create the maximum number of threads that your application can create you will run out of memory. Threads require memory. And it is unlikely to run very well either.
    The default heap size and stack size are documented in the javadocs that explain the tools that come with the sun jdk.
    and how the above things will vary for each OS and how
    do I found ? Threads vary by OS, and OS install. The others do not (at least not with the sun jvm.)
    If I get "OutOfMemoryError: Unable to create new native thread" Most of the time it indicates a design problem in your code. At the very lease, you should consider using a thread pool instead.
    I found in one forum, in linux you can create maximum
    of 894 threads. Is it true ?Seems high since in linux each thread is a new process, but it could be.

  • Options for running threads?

    hi, suppose i have a class that implements Runnable.
    I also have a few different functions I would like to run as threads, depending
    on certain criteria from within the class. What is the best way to go about this?
    the only way i can think of is to have a variable like this:
    private final static int runFirstCase = 1;
    private final static int runSecondCase = 2;
    private final static int runThirdCase = 3;
    public class tester implements Runnable{
    int runType = 0;
    .....class definitions
    public void run(){
      if(runType == runFirstCase){
          //run the first case function
       }else if(runType == runSecondCase){
         //run second case.
        } //...etc.
    }//end run
    public setRunType(int type){
      runType = type;
    public static void main(String args[]){
        tester test = new tester();
        test.setRunType(tester.runFirstCase);
        test.start();
        test.setRunType(tester.runSecondCase);
        test.start();
        //...etc.
    }but this way seems a bit convoluted to me, like i would have to worry about
    the possibility of 'runType' changing from the time i set it to the time i start off the thread, like the time between setting run type and launching the thread
    should be synchronized to some extent to prevent this from happening. Is that
    being too cautious? is it a silly concern?
    anybody have any ideas for me? thanks!

    That has nothing to do with whether you have one
    class or three. How do you think you're going to
    report exceptions now?good point. i just realized i don't know much about
    reporting exceptions from a
    thread. how is this done? i guess if i knew more
    about this subject i could
    bypass all this other stuff.
    any info on it? thanks again for the helpThe thing to realize is that, by their nature, multiple threads run in parallel to each other and to the thread that spawned them. They're asynhcronous with respect to the spawning thread.
    When you call thread.start(), the start method returns more or less immediately, but the thread in question may still be running. Menwhile, your original thread goes about it's business. It's the sequentialness of a single-threaded environment that lets exceptions nd return values work the way they do.
    So the new thread needs to call some method on the parent thread or set some variable or something when an exception occurs.
    But you have to answer this: What will the parent thread do while the children are running? Will it stop and wait until they're all done, and then do certain processing based on their results or exceptions? Or is it just going to go on and die?
    What do you expect to happen when a child thread encounters an exception?

  • Re: Registering for Caller Display. Do I need to?

    Old_Bear: loved your reference to the BT 'groupies'. I know exactly what you mean and we all know the biggest of them all.

    DavidM wrote:
    Hi Old_Bear,
    Thanks for posting. Not sure what you mean by BT 'groupies' but you can check if you're directly affected by the pricing change by entering your details here.
    Cheers
    David
    Hi David
    Old_Bear wrote: 
    I use the price increase checker linked to on the other thread here; it tells me the Infinity/Calls Package will go up, but there is no mention of any changes to my Calling Features prices.
    Been there, done that!
    Also spoke to Live Chat - pretty useless!
    My questions were:
    What else will go up?
    Will I start being charged for caller display, etc. when they are clearly included free as part of the package I agreed to sign up for with your colleague?
    Do I have to sign up/pre-register to get it for free when BT do start charging?
    Will this mean my Line Rental and BB/Calls contracts will have different end dates?
    I only want a straight answer to my questions; Customer Service have so far given me 5 different answers.
    I'm a Private person; I respect those who respect my Privacy.

  • Bought Iphone! But don't want to use it for calling! How to activate it ???

    Hi,
    just bought an Iphone but don't want use it for calling is there a way to activate it without having a contract with at&t or so! I mean I am not sure if there is a way to do this if anybody knows if it's possible and knows how to do it, I would be very THANKFULLLLLLLL!!!! I need help prettty fast thanks so much!

    Why start a new thread on the same topic as before the answers will all be the same you have to activate the iPhone through iTunes and sign a contract with AT&T to activate the iPhone otherwise you wont be able to take pictures or listen to music or use other features, didn't you do any research on the iPhone before purchasing it??? Sounds like you need to return your iPhone where you bought it and just pay the restocking fee and call it good.
    Message was edited by: Geffen

  • In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks

    In Siri, I can call by my voice, but why I can not use Siri voice call in my country (Laos), just can call only us phone number; my country we use like 3 number for option call, 8 numbers for call friend but Siri cannot use this please help us, thanks
    And please help me can type Laos font in it like andrio phone.

    Hi Cozumel,
    Thanks for posting. I'm sorry you're having problems with your bills. I can take a look at this for you. Drop me an email with your account details and a link to this thread for reference. You'll find the address in my profile.
    Cheers
    David
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • Thread safety bug in XPS Serializer or FixedDocument sequence? "calling thread cannot access this object..."

    Every once in a while (500 iterations or more) I'm getting an exception in the static method below stating "calling thread cannot access this object because a different thread owns it".  Thing is, this method references no external objects
    and performs no special threading operations.  All of the WPF objects are created and consumed in this method.  The only aspect that is multi-threaded is that this method can get called concurrently on different threads in the same app domain (the
    project is a Windows service). That said the fileToDecollate parameter will be unique every time, so there is no "collision" as far as that goes.
    Any ideas?   This is maddening and in theory it should not be possible to blow this error.
    Exception Information------------------------------------------
    System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
       at System.Windows.Threading.Dispatcher.VerifyAccess()
       at System.Windows.DependencyObject.GetLocalValueEnumerator()
       at System.Windows.Xps.Serialization.SerializersCacheManager.GetTypeDependencyPropertiesCacheItem(Object serializableObject)
       at System.Windows.Xps.Serialization.SerializersCacheManager.GetSerializableDependencyProperties(Object serializableObject)
       at System.Windows.Xps.Serialization.SerializablePropertyCollection.InitializeSerializableDependencyProperties()
       at System.Windows.Xps.Serialization.SerializablePropertyCollection.Initialize(PackageSerializationManager serializationManager, Object targetObject)
       at System.Windows.Xps.Serialization.SerializableObjectContext.CreateContext(PackageSerializationManager serializationManager, Object serializableObject, SerializableObjectContext serializableObjectParentContext, SerializablePropertyContext serializablePropertyContext)
       at System.Windows.Xps.Serialization.ReachSerializer.DiscoverObjectData(Object serializedObject, SerializablePropertyContext serializedProperty)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
       at System.Windows.Xps.Serialization.FixedDocumentSerializer.SerializeObject(Object serializedObject)
       at System.Windows.Xps.Serialization.ReachDocumentReferenceSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
       at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.SerializeDocumentReference(Object documentReference)
       at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.SerializeDocumentReferences(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.ReachDocumentReferenceCollectionSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(SerializablePropertyContext serializedProperty)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeProperty(SerializablePropertyContext serializablePropertyContext)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeProperties(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeObjectCore(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.DocumentSequenceSerializer.PersistObjectData(SerializableObjectContext serializableObjectContext)
       at System.Windows.Xps.Serialization.ReachSerializer.SerializeObject(Object serializedObject)
       at System.Windows.Xps.Serialization.XpsSerializationManager.SaveAsXaml(Object serializedObject)
       at System.Windows.Xps.XpsDocumentWriter.SaveAsXaml(Object serializedObject, Boolean isSync)
       at System.Windows.Xps.XpsDocumentWriter.Write(FixedDocumentSequence fixedDocumentSequence)
       at MyCompany.Utilities.Document.XPSDocument.Decollate(String fileToDecollate, String outputPath) in E:\Projects\MyCompany\Utilities\MyCompany.Utilities.Document\XPSDocument.cs:line 358
       at MyCompany.Services.ERM.XPSCapture.Decollate(String fileToDecollate, String outputPath) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\XPSCapture.cs:line 210
       at MyCompany.Services.ERM.ERMFileProcessor.decollateERMFile(String tempERMFile, IFileCapture fileCapture) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\ERMFileProcessor.cs:line 1257
       at MyCompany.Services.ERM.ERMFileProcessor.process() in E:\Projects\doc-link\MyCompany\Services\Altec.Services.ERM\ERMFileProcessor.cs:line 354
       at MyCompany.Services.ERM.ERMFileProcessor.Process(ProcessingCompleteCallback callback) in E:\Projects\MyCompany\Services\MyCompany.Services.ERM\ERMFileProcessor.cs:line 90
    Additonal Info------------------------------------------
    ExceptionManager.MachineName: BTP-30-DEV
    ExceptionManager.WindowsIdentity: XXXXX-WA\Bradley
    ExceptionManager.FullName: WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    ExceptionManager.AppDomainName: MyCompany.XXXXXXServiceHost.exe
    ExceptionManager.ProcessInfo: PID=7392, ThreadID=7816, Managed ThreadID=36, Name=MyCompany.XXXXXXServiceHost, Uptime=00:02:12.2548416
    ExceptionManager.ProcessResourceUsage: Working Set=265188 KB, Peak Working Set=525940 KB, Virtual Memory Size=530264 KB, Peak VM Size=809832 KB, Handles=631
    ExceptionManager.SystemMemory: Load=81%, Total Physical=3168748 KB, Free Physical=586736 KB, Total PageFile=5213700
    publicstaticList<string>
    Decollate(stringfileToDecollate,
    stringoutputPath)
      // iterate fixed documents and fixed pages, create new XPS files
    List<string>
    xpsDecFiles = newList<string>();
      using(XpsDocumentxpsSourceDocument
    = newXpsDocument(fileToDecollate,
    FileAccess.Read))
        FixedDocumentSequencefixedDocSeq
    = xpsSourceDocument.GetFixedDocumentSequence();
        intpageNumber = 0;
        foreach(DocumentReferencedocReference
    infixedDocSeq.References)
          FixedDocumentsourceFixedDoc
    = docReference.GetDocument(false);
          foreach(PageContentpage
    insourceFixedDoc.Pages)
            pageNumber++;
            // prepare new fixed doc sequence
    FixedDocumentSequencenewFixedDocSeq
    = new
    FixedDocumentSequence();
    DocumentReferencenewDocReference
    = new
    DocumentReference();
    FixedDocumentnewFdoc
    = new
    FixedDocument();
    newDocReference.SetDocument(newFdoc);
    // copy the page
    PageContentnewPage =
    new
    PageContent();
    newPage.Source = page.Source;
    (newPage asIUriContext).BaseUri
    = ((IUriContext)page).BaseUri;
    // tickle this method... presumably just to load the FixedPage data.
    FixedPagenewFixedPage
    = newPage.GetPageRoot(false);
    // Add page to fixed doc sequence.
    newFdoc.Pages.Add(newPage);
    // Always do this last: add document reference to fixed doc sequence. 
    newFixedDocSeq.References.Add(newDocReference);
    // create and save new XPS doc                   
    stringdecFileName =
    Path.Combine(outputPath,
    Path.GetFileNameWithoutExtension(fileToDecollate)
    + "~"+ (pageNumber).ToString()
    + FileExtensions.XPS);
    if(File.Exists(decFileName))
    File.Delete(decFileName);
    XpsDocumentnewXPSDoc
    = new
    XpsDocument(decFileName,
    FileAccess.ReadWrite);
    // testing.  thread IDs should be the same.
    //Debug.Assert(System.Windows.Threading.Dispatcher.CurrentDispatcher.Thread.ManagedThreadId == newFixedDocSeq.Dispatcher.Thread.ManagedThreadId);
    XpsDocument.CreateXpsDocumentWriter(newXPSDoc).Write(newFixedDocSeq);
    newXPSDoc.Close();
    // add file to list
    xpsDecFiles.Add(decFileName);
      returnxpsDecFiles;

    I have opened a support case with Microsoft through my employer.  I'm convinced there is some .NET framework code that is not thread safe.  I did put together a test harness app that demonstrates the problem (within 30 seconds or so after
    you start it) and I sent that to MS support.  They're looking into it. Anyone else who is curious can download the sample project here:
    https://skydrive.live.com/redir?resid=5CBB4B55BCCB2D67!443&authkey=!AGEnR3CKrXUU6E0
    Bradley
    Bradley P.

  • AAA Radius Authentication for Calling Card Platform

    Hi,
    I am using AS5350 and I am using it for calling card application using Clear Box as my RADIUS Server for AAA. My question now, how would I know if cisco is sending the dtmf for "enter card number.au" on the RADIUS server ? Does the card number included on the VSA ? below are my configurations and the debug info. The problem here is that the card number that I entered doesn't able to match against the configuration on my Clear Box/SQL Database. I want to know what should I expect from CiscoAS5350 to send a vsa for enter_card_number ?
    aaa new-model
    aaa group server radius ClearBox
    server 192.168.1.1 auth-port 1812 acct-port 1813
    aaa authentication login default local
    aaa authentication login h323 group ClearBox
    aaa authorization exec h323 group ClearBox
    aaa accounting exec default start-stop group ClearBox
    aaa accounting network default start-stop group ClearBox
    aaa accounting connection h323 start-stop group ClearBox
    aaa session-id unique
    radius-server host 192.168.1.1 auth-port 1812 acct-port 1813
    radius-server key 7 0355481F031F761D
    radius-server vsa send accounting
    radius-server vsa send authentication
    call application voice prepaid tftp://192.168.1.2/debitcard-multi-lang-Cisco.1.1.0.2.tcl
    call application voice prepaid pin-len 10
    call application voice prepaid warning-time 300
    call application voice prepaid redirect-number 8662195822
    call application voice prepaid language 1 en
    call application voice prepaid language 2 sp
    call application voice prepaid language 3 ch
    call application voice prepaid set-location en 0 tftp://192.168.1.2/prompts/
    call application voice prepaid set-location sp 0 tftp://192.168.1.2/prompts/
    call application voice prepaid set-location ch 0 tftp://192.168.1.2/prompts/
    gw-accounting aaa
    ==================================================
    Getting session id for NET(00003600) : db=6418E654
    AA/ACCT/NET(00003600): add, count 1
    Getting session id for NET(00003601) : db=6410D098
    AAA/ACCT/NET(00003601): add, count 1
    AAA/ACCT/CONN(00003601): Pick method list 'h323'
    AAA/ACCT/SETMLIST(00003601): Handle 94000002, mlist 62D3B124, Name h323
    Getting session id for CONN(00003601) : db=6410D098
    AAA/ACCT/CONN(00003601): Queueing record is START
    AAA/ACCT(00003601): Accouting method=ClearBox (RADIUS)
    AAA/ACCT/EVENT/(00003601): ATTR ADD
    AAA/ACCT/CONN(00003601): START protocol reply PASS
    AAA/ACCT/EVENT/(00003601): VOICE DOWN
    AAA/ACCT/HC(00003601): Update VOICE/000020D3
    AAA/ACCT/HC(00003601): VOICE/000020D3 [sess] (rx/tx) base 0/0 pre 0/0 call 0/0
    AAA/ACCT/HC(00003601): VOICE/000020D3 [sess] (rx/tx) adjusted, pre 0/0 call 0/0
    AAA/ACCT/CONN(00003601): Queueing record is STOP osr 1
    AAA/ACCT(00003601): del node, session 174133
    AAA/ACCT/CONN(00003601): free_rec, count 1
    AAA/ACCT/CONN(00003601): Setting session id 174144 : db=6410D098
    AAA/ACCT/HC(00003601): Update VOICE/000020D3
    AAA/ACCT/HC(00003601): Deregister VOICE/000020D3
    AAA/ACCT/EVENT/(00003601): CALL STOP
    AAA/ACCT/CALL STOP(00003601): Sending stop requests
    AAA/ACCT(00003601): Send all stops
    AAA/ACCT/NET(00003601): STOP
    AAA/ACCT/NET(00003601): Method list not found
    AAA/ACCT/CONN(00003601): STOP protocol reply PASS
    AAA/ACCT/CONN(00003601) Record not present

    VSAs are collected by the RADIUS server during the accounting process when AAA is configured with the Debit Card feature. Data items are collected for each call leg created on the gateway. A call leg is the internal representation of a connection on the gateway. Each call made through the gateway consists of two call legs: incoming and outgoing. The call leg information emitted by the gateways can be correlated by the connection ID, which is the same for all call legs of a connection.
    Use the H.323 VSA method of accounting when configuring the AAA application.
    There are two modes:
    •Overloaded Session-ID
    Use the gw-accounting h323 syslog command to configure this mode.
    •VSA
    Use the gw-accounting h323 vsa command to configure this mode.

  • Waiting for a thread to die.

    Hello, I hope you can help me...
    I am writting a jdk1.4.1 Swing application that displays a small animation. This animation is processed from within a separate thread. My program makes a call starting this 'animation thread'. For practical reasons my program needs to wait for this thread to die (and thus the full animation to be shown) before it can continue. I am waiting for the animation thread to die using Threads 'join' method. However the problem with this is that I am forcing the GUI thread to wait resulting in the animation being calculated but not displayed. And so... how can I fix this... all I want is to wait until the animation is shown.
    What I would like to do is:
    1. Start animation;
    2. wait intil animation has completed;
    3. continue with program.
    Any help or advice will be greatly appreciated.
    Thank you in advance.

    Maybe this design could work for you. You divide your program into three parts running in three separate threads.
    1. The main thread handling GUI stuff and coordination of the two other threads.
    2. A working thread doing most of what the main thread is now doing.
    3. The animation thread.
    With this division of labour the working thread is waiting for the animation thread to finish (the main GUI thread isn't). The main thread will be free at all times to react to the users input or updating the screen or whatever, while the other two threads are cooperating to produce the animation.

Maybe you are looking for

  • Alert is not working for a library

    Hi,   Alert is not working for one library in a site collection only. For others it is working fine. So, we have taken the template of the library and created a new library and tested there, alerts are working fine also. So any idea what can be the i

  • How to batch upload PDF files into database BLOB

    Hello. I have a requirement to batch upload PDF files into BLOB column of an Oracle 8.1.7 table from Forms 6i Web. The content of the blob column (ie. the PDF content) MUST be displayable from all client software (eg. Oracle Web forms, HTML forms, et

  • IPhoto missing photos, sorta...

    A strange thing recently happened with my iPhoto. Yes, my Mac and all apps are up to date. I imported some photos from my iPhone. After the import, not all the photos show up in the "Photos" or "Events" sections. However, they do show up in "Last Imp

  • ADS: ADSUser get 403 Forbidden for RFC Check of ADS RFC in SM59

    Hello, i created the RFC Connection for ADS-Service. But if i test it i get a 403 Forbidden response with the ADSUSER. URL: host:50000/AdobeDocumentServices/Config I found no reason for this. Have checked all in [Adobe Document Services Configuration

  • Viewing ppi and white balance in exif??

    Hi Folks I'm wondering if it's possible to see ppi and white balance settings for an image in the metadata panel within LR. I don't see it now and I don't know if it's just not possible, or if I've overlooked a setting somewhere. Thanks for your help