How to let new thread to access EJB

I start new thread in Servlet class and I want this thread to call EJB business method but I get following error:
javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:"
Probablly because thread has no credentials and so on. I know this concept violates J2EE specs but I don't know how to make timer to call business mathod every N minutes (I use J2EE 1.3 so I can't use Tiemr EJB).
I suspect that this new thread has no credentials and no role. What happens if I set run-as some role in servlet? As I saw new thread still has no credentials and role.
Can anyone suggest me how can I set credentials to new thread so it can call EJB business method or how to implement timer service in J2EE 1.3.

I start new thread in Servlet class and I want this
thread to call EJB business method but I get
following error:
javax.naming.NameNotFoundException: Name comp/env/ejb
not found in context "java:"It may happen because you'r new thread doesnt have information (JNDI environment) about EJB references.
Can anyone suggest me how can I set credentials to
new thread I guess it's server specific.
so it can call EJB business method or how
to implement timer service in J2EE 1.3.Don't use EJB reference. Lookup EJB by it's global JNDI name.

Similar Messages

  • How do I use a new AppleID to access same iTunes Library?

    How do I use a new AppleID to access same iTunes Library?
    I would like to use my Family's AppleID (already created) to login to my iTunes Library on my iMac.
    This is the first step, then I will build that account, and then sync my family's iPad with this account (currently synced with my personal iTunes account.
    Can anyone please help me with the exact steps I should follow to "logout" and then logback in to iTunes using a different AppleID but access my current library(primarily music and Apps) (move library from my personal AppleID to new Family AppleID)?

    See Here  >  http://support.apple.com/kb/HT1751
    And Here...
    https://discussions.apple.com/thread/4083591?tstart=0

  • How to access EJB deployed in JBOSS 4 from Creator

    Hello.
    I am trying to access EJBs deployed on JBOSS in order to develop a web app client, when I import the EJB set from Creator (sessions and entities packages in a jar file) I got the following error message....."No EJB set found in file....." .
    I presume there is an kind of xml file description specific for Sun App Server missing. I would like to know if there is other way to expose EJB in creator?....maybe write a config file by hand.
    I already read the tutorials related to EJB but those only use pre build EJB jars for Sun App Sserver.
    Also I read all the posted about JBoos and EJB in this forum but those are pretty general.
    By the way I have Delegate classes to access the EJB. How do I register my delegates in Creator in order to expose their methods?
    I�ll really appreciate some light in this matter.
    Thanks in advance!!!

    Hi,
    The below forum thread may help you :
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=51321
    Thanks,
    Runa.

  • How can I access EJB  through executable jar file?

    Hello buddies!!
    I wonder if anyone could give me an explanation of how accessing EJB through executable jar file?Thanks!!

    Hi there,
    You'll need to install the J2EE SDK on the client and include the <j2ee install dir>\lib\j2ee.jar file in your CLASSPATH along with the Client Jar file that was generated by the deploytool when you deployed the application.
    In your client code the Context properties are as follows:
    Properties p = new Properties();
    p.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    p.put(Context.PROVIDER_URL, "iiop://hostname:portnumber");
    Context cntx = new InitialContext(p).Hope this helps
    Amanda
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers

  • How can I create a new thread to run PulseOutput.VI

    Hi:
      I use NI-94729(cDAQ system) to generate pluse and want to output  pulse continuously and to check the pulse is 500Hz.
      In TestStand, the steps as follow:
      1: Call PulseOuput.vi to generate 500Hz pulse, VI use Finite Mode to generate pulse.
      2: Verify the pulse is 500Hz.
     Howerver, after the first step finishes, the pulse output stops, te 2nd step is failed. If a Continuous Mode is used in PulseOuput.vi to generate pluse, the 1st step can't finish.
    Thanks a lot!

    Hello MotionBoy,
    There are two ways to go about creating a new thread to run a step.  The first is to create a new sequence, into which you put the LabVIEW step you want to run and any other steps that may go along with it.  Then use a sequence call step to call this newly created sequence.  Set the Execution Options of the Sequence call step to 'Use New Thread.'  This will allow you to run a set of steps in a new thread, not just a VI.  The second method, which is only available for a LabVIEW VI, is to use the “Run VI Asynchronously” step.  This can be accessed if you right-click within your sequence and select Insert Step » LabVIEW Utility » Run VI Asynchronously.  This step will allow you to call a VI and have it automatically open in a new thread.  You can further customize this step by opening the configuration menu in the Step Settings.
    To address the current behavior of your steps I would like to know if the modules in steps 1 & 2 pass data between them or it would be desirable for them to do so?  If so you are going to need a more complex synchronization structure such as TestStand/LabVIEW queues. There is a simple example you may want to look at in the TestStand examples, under the Synchronization folder that demonstrates how to use queues. Otherwise the above solution should be all you need.
    John B.
    Applications Engineer
    National Instruments

  • How can I get my old iTunes music onto my new computer without access to my old computer? I left my previous job and forgot to transfer my music. I bought iTunes match and it shows my old Mac as a device, but I cannot get the music off it.

    How can I get my old iTunes music onto my new computer without access to my old computer? I left my previous job and forgot to transfer my music. I bought iTunes match and it shows my old Mac as a device, but I cannot access any of the old music. All I can find are what was on my iPhone, but that's not what I want. I need all my old music from my old Mac, which has been wiped clean by IT at my old job. BUT, I did have iCloud at that time and I thought all my music would be accessible through it. I don't understand the Cloud! And I'm thinking spending $24.99 on iTunes Match was a waste of money because I still can't access my old music.

    When you are done with this issue, consider the computer back at the office may still
    have access to your iTunes account, and it should be de-auhorized. You can do that
    remotely, but be sure you carefully do not mess up your other computer iTunes libraries.
    Good luck & happy computing!

  • (New thread) HP SimpleSave md1000h External Hard Drive - Can't Access Files,

    New thread on same old unaswered issues from others.
    My desktop crashed.  It  needs new harddrive.
    I religiously backup my info everyweek on my simplesave md1000h
    However, before I buy a new computer or replace the harddrive on my old computer, I want to at least get my Quicken Checking account info up and running on my wife's  laptop.
    When I plug in the usb for the md1000h into the laptop,
     it recognizes the  hardware is there but, does not show any files.
    I presume my laptop needs the software to run the simple save.
    However, there is nothing out there on the HP site.
    Can anyone confirm that this is the issue...that I need the software...if so, where can I download it from.
    I beleive the softweare came preloaded on the md1000....now I cant access that software....go figure.
    Any help is appreciated.   Thanks.  Greg

    I too have the exact same problem on my HP SimpleSave (sd500a) external hard drive. I got through to WDC, and they apparently support these devices now. They asked me to send them a copy of my purchase receipt in order to extend my warranty in their system in order to help me (ridiculous!!). I sent the scanned copy of the receipt to [email protected], and got an auto-reply that they will get back to me within 1 day. I also went on their website, and they refer to the device in their system as 'ED Caviar Blue EIDE Hard Drive'. It has the same serial number as my product from HP, so I guess they have acquired these products or at least support of them (?). In any case, I'm freaking out because I have tons of family pictures, video and my entire iTunes library on the device. If any one is able to get help for this, please respond. I am desperate to get this resolved.

  • How do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    how do i get all my data and info from my old iphone onto my new one without access to the original itunes that i set my first iphone up on? my partners itunes keeps telling me that its going to replace all my apps and data with his stuff

    ok so i have my own i tunes library - how do i get all my old apps onto my new library?

  • How can I include results of a subsequenc​e, which runs in a new thread, in the main sequence test report

    Hi!
    I', m working with TestStand Version 4.2.1. I have a main sequence, which calkls different subsequences. All these steps are properly reported. One of subsequences runs as "new thread". How can I include its results in common test report of the main sequence?
    I have markes variables of the subsequence as it is requred for test report (it works OK if it is not a new thread). If the the numerical test, which is executed in this subsequence is correct, I get no results at all. If the numeric test failed I get somewhere in the main sequence report a "red message", that test failed whithout any reference to the step or values of vaiables which were not correct.
    I tried an option "On the fly" in the Report Configuration , but haven' got any useful results. What shall I do?
    Best regards
    Solved!
    Go to Solution.

    Hi,
    I tried it but without success:
    1) I got a reference to the Thread as "Locals.Step1=RunState.Thread" for every of 2 steps which start a thread
    2) I put both "Waits" after steps with (and without) threads, at the same place, where they were before
    3) The sequence run OK, but when it came to Wait for Thread 1 it waited for ever, I had to terminate sequence
    Does it mean, that I got a false reference (suppose No - please, have a look at attached pic)?
    Or does it mean, that Waits are badly placed in the sequence (threads are already terminated)? Here is a pic of sequeces calls with Wait after them.
    Regards
    Attachments:
    Thread.JPG ‏34 KB
    SequenceCall.JPG ‏32 KB

  • How to call a sequence in a new thread from C++ dll

    Here is what I am trying to do:
    I implemented a dll that monitors network traffic, and it also supports message handlers that can be triggered when a specific message has been received. Essentially the receipt of a message is like an event causing additional code to be executed. What I need to do is have the message handler in the dll call/execute a sequence (either is the same sequence file that originally called the dll, or in a different sequence file). Also I want the sequence to be executed within the same execution object for the purpose of result collection and report generation. I am expecting the dll to have to launch a new thread to call a sequence because of the asynchronous nature of the message received event.
    There are easier ways to achieve the same result, but one of my goals is to make it easy for a test developer to configure a message handler, by having only one step in their sequence to configure the message handler. I want the rest to be transparent to the user.
    I am unsure about how to implement this feature, so I am asking for any examples, ideas, comments before I start trying things out.

    Assuming that I understand your question correctly, it would seem to be the best way to do this would be to pass the Execution object to the DLL (either through a direct pass of the Execution object or passing the sequence context, from which you can get the Execution).  Then simply call Execution.NewThread, specifying the SequenceFile object (accessible from Engine.GetSequenceFileEx) and then passing the Thread object out as an output.  Your sequence file in which your DLL is called could then simply have a Wait step which is configured to wait on that Thread object.  What happens in this case is that the results are collected for that thread (which is being executed asynchronously) and returned as the results for the Wait step.
    Although you are probably not using LabVIEW, I have attached an example of this in LabVIEW that might be helpful just for seeing the flow.
    Thanks,
    Andy McRorie
    NI R&D
    Attachments:
    thread_test.seq ‏32 KB
    testthread.vi ‏19 KB

  • How to access ejb jar in ear package from other war web package?

    How to access ejb in jar packed in ear package from other war web package?

    Typically you would just look the EJB Home up in JNDI. If you're
    looking for example code, the medrec example in WLS 8.1 or petstore has
    plenty of webapps calling EJBs.
    -- Rob
    CottonXu wrote:
    How to access ejb in jar packed in ear package from other war web package?

  • How to run VI in new thread

    How can I run my labVIEW VI in a new thread without having to restart LabVIEW every time before I run?

    You can also load the VI through the VI Server. Since the data flow is avoided, and the VI is essentially loaded as external code, it gets it's own thread as far as I know.
    When doing this, setting the Property "Wait until finished" to false is quite useful too.
    Hope this helps.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Vi server.png ‏16 KB

  • How to create a new thread in display function -----Java OpenGL

    use netbean 6.1 to do this work.
    public void display(GLAutoDrawable drawable) {
          GL  gl = drawable.getGL();
          //I want to create a new thread here to draw an object
          Thread dt = new Thread(new DrawThread(gl,2),"Thread0");    //create a thread,DrawThread is a class I define
          //but it failed when compiling
          //are there any other ways or how to improve my method?
    }I want to do like this because I do not like to block the main thread when it is drawing an object

    Well, the autocode in your application is maintained by your autocode module, any attempt at changing it will result in having it reset back to the original autocode--that's one of the gotcha's about using autocode.
    Since it looks like you may not have the skills to do what you are asking and relying on the autocoder, you should probably start here:
    [Java Tutorial|http://java.sun.com/docs/books/tutorial/]
    And stay there until you are comfortable coding for yourself.

  • HT4527 How do you move your iTunes library to a new computer without access to your old computer?

    How do you move your iTunes library to a new computer without access to the old computer? The old computer id damaged and unavailable.

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT203604 How do I authorize a new iMac to access purchases

    How do I authorize a new iMac to access purchases with my apple ID in App store??
    iMac 27" Intel Quad i5/2.7Ghz
    (iMac 12.2-i5)  Model A1312
    8g RAM  1Tb HD
    Yosemite 10.1.1
    App Store V2.0

    Sorry for late reply... I should have been more specific, for I had tried to authorize my new iMac several times without success... Realized I needed to de-authorize a much older mac that was in another room. Then ~ yup, problem solved.

Maybe you are looking for

  • How to show grand total at bottom in Pivot view?

    Hi All, How to show the report Grand total at bottom in pivot table?Plz help. Regards, Vaishnavi

  • Plant to plant transfers

    Hi guys, We have a scenario wherein we will place a Purchase Order on a vendor from Plant1 (belonging to company code1).  The material has to be delivered in Plant2 of company code2.  The quality inspection, MIGO of these transactions are to be done

  • I need APO DP enduser training material

    hi gurus, i need APO DP enduser training material, how to give the end user training, what contents should i tell and what is the process of end user training. can u tell me how should i give. Regards, babu

  • Jakarta Commons FileUpload ; Internet Explorer Problem

    Hi all, Environment: Tomcat 5 ;Apache 2; JDK 1.5.0; Jakarta Commons Fileupload 1.0 OS: Windoze XP Previously I've used jakarta commons fileupload package to succussfully to upload a file. However, I am trying to check the content type of the file and

  • Liquify Filter causing semi-transparent layers to become brightened

    Hi, I'm having an issue with the Liquify Filter's final results. When using the filter it works fine, and if I use the filter on a solid layer its results given back to the original image are perfect also. However, using the filter on a layer that ha