How do I get a reference to the SecurityServices instance in my web appl?

I would like to use the audit provider of weblogic to log audit event that I send from my servlet. For writing a auditevent I need a reference to the AuditService instance. How do I obtain that? IS there any static class through with I can get references to the security services?
Lakshmi

Pete,
The Thread class's public static Thread currentThread() method will return a reference to the Thread object that represents the thread of execution that is live when the method is invoked. More simply, it provides a reference to the currently executing thread.
So you could use this as a key in a hashtable to represent which thread has a lock on some entity:
   // "hash" is a hashtable
   // entity is an Object representing something that is locked (like
   // a record number or a resource identifier)
   hash.put(Thread.currentThread(),entity);I think this answers your question, unless I misunderstood you.
Damian

Similar Messages

  • How can I get a reference to the Local interface of a EJB 3 session?

    Hi,
    How can I get a reference to the Local interface of a EJB 3 session?
    My session implements both the local and remote interfaces, so in my client, when I look up the remote interface using the following code, I did get a reference
              processor = (IItemProcessorRemote)initialContext.lookup(IItemProcessorRemote.class.getName());but if I also look up the local interface in th eclient using this:
    processorLocal =(IItemProcessor)initialContext.lookup(IItemProcessor.class.getName());I got errors like the following, do you know why? Thanks a lot!
    Exception in thread "main" javax.naming.NameNotFoundException: sessions.IItemProcessor not found
         at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:203)
         at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:175)
         at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:61)
         at com.sun.enterprise.naming.RemoteSerialContextProviderImpl.lookup(RemoteSerialContextProviderImpl.java:116)
         at sun.reflect.GeneratedMethodAccessor114.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)

    BTW, findItemByTitle(String title) is a business method in my ItemProcessor session bean.
    public String findItemByTitle(String title) {
              AuctionItem item;
              String result = null;
              try {
                   Query query = entityManager
                             .createNativeQuery("SELECT i from AuctionItem i WHERE i.title LIKE : aTitle");
                   query.setParameter("aTitle", title);
                   item = (AuctionItem) query.getSingleResult();
                   result = item.toString();
              } catch (EntityNotFoundException notFound) {
              } catch (NonUniqueResultException nonUnique) {
              return result;
         }

  • How can a get a copy of the license cert for: Adobe Web Premium      5.5

    I have the SN from https://licensing.adobe.com/sap%28bD1lbiZjPTAwMw==%29/bc/bsp/sap/zavlreports/retrieve_seri alnumbers.htm
    but there are dozens of poosible search combinations I'd have to wade throught since I don't have the Adobe order number or PO number.
    Also, I get an "Deploy to id is not linked to End user specified; search aborted" error when using the same numbers as I used to retrieve the SN.

    On the LWS site (https://licensing.adobe.com).
    According to me the best option : you can search via approx dates when it was ordered to arrive at the Order number and download the license certificate.
    Secondly if the License certificate you require is for the serial keys .. and if you are a CLP customer.. the license key remains the same for all Web Premium CS5.5 ordered by you or your organisation.
    Hope this helps.

  • Clicking Fx in the Vista quick launch bar now always opens new window. How can I get it to open the current instance?

    This may be a Vista issue since Opera now always opens with a new speed dial window instead of just recalling the browser. This problem is recent, perhaps a month old.
    Fx is not the default so I don't know if it's also a link issue

    Make yourself a copy of the Fx in the task list, then you can either create a new instance or activate the existing one.
    Probably missing the point, but I have been away from Vista for quite some time.
    Regards

  • How to get a reference to the owner of a class instance?

    Within a method of a class, how can I get a reference to the
    object containing the class instance?
    To be clear: I have class B that contains a method, say
    "myfunc()". Class A (say, the application itself or a custom
    component) instantiates a new instance of Class B : myclassB=new
    ClassB()
    Now, from within myfunc() can I get a reference to Class A?
    The simplest way here is to pass a "this" reference when
    calling myfunc(), i.e. "myclassB.myfunc(this)" but I would prefer
    not to have to remember to always use 'this'.

    Are these objects within each other. Does classA own classB?
    If that is the case, then Greg is correct and it should be
    available in parentDocument.
    In projects in the past we have created a central
    refObjectLocator object that is available to all objects.
    Mostly we use events to communicate between objects. Dispatch
    an event and let whoever listen for it.
    Here is a copy of our reflocator if you are interested.
    package com.goconfigure.model {
    import mx.collections.ArrayCollection;
    import com.adobe.cairngorm.model.ModelLocator;
    import com.goconfigure.util.HashMap;
    [Bindable]
    public class RefObjectLocator implements ModelLocator {
    // this instance stores a static reference to itself
    private static var refObject : RefObjectLocator;
    public var refObjectHM : HashMap = new HashMap();
    // singleton: constructor only allows one model locator
    public function AppLocator() : void {
    if ( RefObjectLocator.refObject != null )
    throw new Error( "Only one RefObjectLocator instance should
    be instantiated" );
    // singleton: always returns the one existing static
    instance to itself
    public static function getInstance() : RefObjectLocator {
    if ( refObject == null )
    refObject = new RefObjectLocator();
    return refObject;
    public function addRefObject( pRefObject : Object, pName :
    String ) : void {
    refObjectHM.put(pName,pRefObject);
    public function getRefObject( pName : String ) : Object {
    return refObjectHM.getValue(pName);
    public function removeRefObject( pName : String ) : void {
    refObjectHM.remove(pName);
    public function clearRefObject() : void {
    refObjectHM.clear();

  • After 6 months of iPad bliss....My iPad has the incorrect apple ID how do I get it to use the correct one?

    After 6 months of iPad bliss....My iPad has the incorrect apple ID how do I get it to use the correct one?

    Settings > Store > Apple ID.  Sign out and sign in with the correct one.  Note that all apps are forever tied to the account they are purchased under.

  • How can I get a reference to all controls on a front panel of one type )for example of the type Text Ring?

    I'd like to set the strings[] property of all the Text Ring controls on a front panel at once without creating a property node for every text ring. How can i do that?

    > How can I get a reference to all controls on a front panel of one type
    > )for example of the type Text Ring?
    >
    > I'd like to set the strings[] property of all the Text Ring controls
    > on a front panel at once without creating a property node for every
    > text ring. How can i do that?
    This is likely more complicated than making property nodes for each
    ring, but you can do it. Make a subVI that takes in a panel reference,
    reads the array of control references, loops through them looking for
    rings, and modifying the Strings[] property on each ring.
    The part of this that will probably be the least obvious, when you
    have an array of control references there are two ways to find out
    if an element is a ring. You can read the classID and compare it
    to the cla
    ssID of a true ring control. An alternative is to cast
    the control reference to a ring control using a Cast to more specific
    node and wire the error out to a case structure. The error case is
    where the objects that aren't rings will go. The success case case
    where you will have a valid ring refnum that you can use to modify
    the strings.
    Greg McKaskle

  • I am trying to print a pdf document from an electronic journal at my school, and i can only get it to print what is on the screen at the time i hit print.  How do i get it to print the whole document?

    how do i get it to print the whole article?  i don't seem to have a problem printing from my old windows laptop

    melbaby_3 wrote:
    when I clicked on your link and hit print, all pages were there!
    That suggests there's no problem with Safari or Quartz, the PDF rendering engine used by Safari, Preview, and other Mac applications.
    When I'm in the database and have the article open that I want to print, I click on the "full text in pdf" link and it opens in another safari window.
    Does the PDF in this other Safari window have all the pages? If yes, why don't you print from this window?
    It's very difficult to tell what might be going on if you don't give very specific details.
    For instance, in many reference databases, full-text articles are not free. You have to pay to view them, either article by article, or by subscription. Your school may have such a subscription, but, if it does, you probably need to access the database through the portal, web site, or facility provided by your school (your school's librarian should be able to help you with that). If you don't, the database has no way of knowing you have a right to view the full text, and may give you just a preview or the article's first page.
    Another possibility is that the database provides full-text PDFs in a format not compatible with Quartz, which may be able to render only the first page. But, in such a case, I'd expect Safari to print blank pages. If that's the case, you need to save the PDF on your hard disk and open it with Adobe Reader (Preview wouldn't work).
    There are other possibilities, but these two seem to me the most likely.
    Would I have to save it in preview first
    You should save the PDF on your hard disk from Safari. (I think you should do this anyway, just in case you need to refer to the article again later.) Instead of just clicking the  "'full text in pdf' link", press and hold Control, then click. This should give you a contextual menu; if the link points to a PDF file, you should see the commans "Save Linked File to 'Downloads'" and "Save Linked File As…". Use either, save the file, then, in Finder, double-click on it. Preview should open it.
    It is possible that the link is not to a PDF file, but to a script which fetches that PDF file for you. In that case, it's pointless to download it. Click on it, and then, if the PDF viewing window opens in Safari, move the cursor towards the centre of the bottom of the window. A bar with commands should appear; one of them will download the file to your Downloads folder.

  • Moving controls about on a VI's front panel. How do you get a reference to a 'grouped' set of controls?

    Basic problem (annoying, if not disasterous - but common - at least for me):
    When you are trying to sktick two different VIs together and you copy the block diagram of one to the other, it sticks all the controls in the middle of nowhere.  THen you have to spend about 10 mins dragging the controls screen by screen from one end of the diagram to the other - sometimes over 15 screens.  Surely there has to be a better way?
    ** Incidentally you might think that labview would have these sort of settings in the 'properties' of the control on the right click menu - but no joy.
    I guess the obvious thing is that you can write a VI which will get a reference for a particular control and then say set it's position (x,y) to zero.  Only thing is that generally there will be a selection of controls, and often they will be organised nicely - after getting them to zero you don't want to have to reorganise them again.  I tried grouping the controls, but then the problem is - how do you get a reference to a group of controls.  If you move one of them it doesn't keep the spatial arrangement.  At this point i have got lost - and easily spent more time than it is worth fixing this problem.
    Any thoughts?
    Solved!
    Go to Solution.

    If I understand you correctly, when you copy the block diagram from the second VI to the first, the controls of the second VI end up in far left field on the front panel of the first, correct?  I think these added controls will maintain their relative locations among themselves so you should be able to find them all as a group out in left field. Then it's simply a matter of how to get them to enmasse join the rest of the controls on the front panel. There are a couple of easy ways to do this. There is a button on the toolbar at the top of the front panel window that allows you to reorder/group/ungroup front panel objects. You can select all controls/indicators out in left field and "group" them together. (As an alternative, you can also drop them all onto a tab control which will act as container for them). Then you select this group and with it selected scroll back over to the existing front panel and find and ALSO select (hold down shift key) a control/indicator from the existing group too. Then with BOTH the existing control selected and the new group (or tab control with the new group) selected you use the ALIGN buttons to quickly bring a corner of the new group into alignment with the old control. At that point you can ungroup the new stuff and move it where it needs to be. 

  • I need to replace my laptop Hard drive.  How do I get my iTunes off the old hard drive to an external so I can put it back on the new hard drive?

    I need to replace my laptop Hard drive.  How do I get my iTunes off the old hard drive to an external so I can put it back on the new hard drive?

    Type move itunes library into the google serach bar.
    It has always been very basic to always maintain  abackup copy of your computer.  Do you not have a backup copy?

  • How can I get iTunes to display the tracks from a CD in their original (album) order?

    To be absolutely honest, I don't really understand what this box is for, so I shall just use it to repeat and expand on my question. (I have already sent a "Feedback" comment on the same topic).
    How can I get iTunes to display the tracks from a CD in their original (album) order?
    It seems to me that there is something very basic wrong with the way iTunes handles CD Tracks.
    Professionally produced CD tracks are seldom if ever in a randomised order. Why then does iTunes seem unable to display the tracks in the order they appear on the original CD source - whether from a personally owned CD or from a download from the iTunes Store?
    Some music demands a specific, non-alphabetic sequence in order to make sense. Why does it seem that iTunes only offers Alphabetic, or reverse alphabetic order - both of which make a nonsense of the original, often intended order of tracks?
    Why not replace the so-called "cover-art" in the bottom left hand corner if the iTunes window - which, while it may look attractive to some, gives the barest of information concerning the original disc, with a list of the original CD tracks in their original order, so that the user can easily reestablish the order in which they should be played.
    As I would expect legibility might be a problem with doing this, why could not the original contents, (in their original order), at least, be displayed when the "cover art" is double clicked-on - the result of which at present gives me an enlarged version of the "Cover Art". While on the subject of the contents of the source disc, what about all the album notes which someone takes trouble to write in order to increase the appreciation of the music on the CD and the listener's general background knowledge of the artists involved. Such notes, it seems to me, have considerable intrinsic value in their own account. I would, I think, normally be prepared to buy such "Sleeve notes" - so long as a "taster" was supplied (as it is for the music) - for something like the cost of a single 'Tune" on iTunes.
    These two aspects let Apple iTunes down enormously, in my opinion. I think that by chopping even quite protracted sequences of music up into bits does no one any favours - except perhaps Apple's already quite substantial bank balance. People have to be aware that two and a half, to three and a half minutes is a very short time to develop a piece of worthwhile music, and that there are many, many composers, not all of whom are alive today who have written music that huge masses of mankind value for the enrichment of their lives and the human condition in general.
    Please make the viewing of iTunes tracks in their correct order by default possible. By all means have the alphabetical variations available as offering a different approach to the music, but not the sole approach to it - PLEASE.
    Frustratedly yours
    Alan Whitaker
    PS I work at my old 24" iMac Intel Core 2 machine which runs OS "Tiger" - because it is more beautiful to look at, the screen is more pleasant to work on, and because, in some ways it is more capable (it will run FreeHand MX without needing a "patch"), than my more recent 21.5" which runs "Snow Leopard". (I don't find it that much slower, either).

    Dear Mike
    Thanks for the support. I am utterly amazed that after all the hype about how good iTunes is that it cannot play a downloaded CD in the correct order, and that what that order should be is not available directly from within one's own iTunes installation. (I know that one can go back to the iTunes Store to check what the order should be, but having downloaded the tracks surely iTunes is clever enough to retrieve this important information.
    My iTunes to differ from yours in that I have also noticed that it seems unable to download copies of my "talking books" in the correct order either. But in my case it downloads them - from a CD - in order, but with the first track downloaded first - so that it appears at the bottom of the column of tracks so that it would get played last! (At least this is, while being inexplicable, a relatively "logical" bit of blundering and because of this is relatively easy to put right!).
    I like many genres of music, some of which are not really programmed except perhaps by the artist performing them. I know that Frank Sinatra was very careful to programme his album songs to obtain a particular effect and in relation to the keys of the music. iTunes presumes to know better.
    Film scores may be totally randomly put together, in some cases, but in others the order is vital to one's appreciation of the music as a whole and how it relates to the plot of the film.
    In symphonic music most works are divided into sections and are conceived by the composer that way. Some individual sections may gain a life of their own if played separately, but they are never complete in the sense that the composer envisaged them without being placed in their proper context.
    Opera and probably most choral music too, is similar except that the words may well become meaningless if the order is changed at the whim of a piece of ill-written computer code, while ballet music has to be heard totally within its sequential context or it becomes meaningless.
    Finally, I would venture that iTunes, by jumbling up the order of the tracks as recorded on a CD, does an immense disservice, not only to the music on a particular CD, but to music in general, by expressing everything in terms of "Songs" - which it seems to interpret as stand-alone items of between 2 and 4 minutes whatever the genre. Even the way the iTunes publicity speaks of how many "songs" it can store instead of how many minutes or hours of recorded sound. This has to be another brick in the wall of "dumming-down" of people's expectations, and the shortening of their attention spans.
    I don't know about anyone else, but I feel betrayed by Apple over this. Perhaps the look, feel and general presentation of an item are not the most desirable features of a consumer product. Maybe it should be judged more on it fitness for the purpose for which it was sold. There is one other possibility - that Apple are trying to redefine "Music" - and that everything that lasts longer than about 3.5 minutes or is in the form of what could for want of a better term be called symphonic in the broadest sense is something else - not "Music" within Apple's new definition, at all!
    Well that's off my chest! now I can get down to creating some sort of order in my iTunes Libraries, knowing that I have to reconsult all the sources in order to confirm the source playing order.
    Anyway thanks again. At least I know that it is not just me
    alanfromthatcham

  • I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    I am changing from Word to Pages. I have created my custom template with all my styles etc and that is what comes up when I go for a New Document. Fine. How do I get it to use the same Custom Template when I use Pages to open a Word document?

    The template is a document in itself, it is not applied to an existing document whether it is a Pages document or a Word document converted to a Pages document.
    You would need to either copy and paste content, using existing styles, or apply the styles to the converted Word document.
    You can Import the Styles from an existing document and those imported Styles can be used to override the current document's styles:
    Menu > Format > Import Styles
    The process is simplified if the styles use the same names, otherwise you will need to delete the style you don't want and replace it with the one that you do want when asked, then the substitution is pretty straightforward.
    Peter

  • My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    My calendar on my iPhone 4 erases all data over a month old except for recurring events.  How Do I get it to keep the info and not erase calendar events?

    Settings>Mail, Contacts, Calendars>Calendars>Sync>All Events.
    Note: If you're using a work Exchange account, the administrator my have restricted your options for this setting.

  • When I open an event, including flagged items, the photos appear one by one, not as thumbnails, so I can't export more than one phot at a time. How do I get iPhoto to show the thumbnails?

    When I open an event, including flagged items, the photos appear one by one, not as thumbnails, so I can't export more than one phot at a time. How do I get iPhoto to show the thumbnails?
    I've tried rebuilding the thumbnail database, but that hasn't helped.

    What version of iPhoto and system are you running?
    Try moving the Zoom slider at the bottom of the iPhoto window all the way to the left.  Does that let more than one photo display in the window?
    OT

  • I have all my songs in my iTunes library on the computer, but when I press the button to sync it, it doesn't put the songs on my iPhone. I have songs from my iPod on here too.  How do I get it to put the songs on my iPhone?

    I have all my songs in my iTunes library on the computer, but when I press the button to sync it, it doesn't put the songs on my iPhone. I have songs from my iPod on here too. How do I get it to put the songs on my iPhone?

    Have you selected the music to sync?

Maybe you are looking for