How to access "Alternative Realm" or "Custom Realm" from components like Servlet ?

Hello,
Says if I have alternative realm or my custom realm which implement
"ManageableRealm" interface. How can I access the realm from other
component, like Servlet or EJB in same WLS ? I tried using code like this
BasicRealm realm =
Realm.getRealm("XmlRealm","weblogic","myclass.DebugRealm");
if (realm != null) {
Class realmClass = realm.getClass();
out.println("Realm is " + realmClass.getName());
Which "myclass.DebugRealm" is classname of my own realm. This realm works
fine when using for authentication and authorization. But when I run this
code on servlet, it seems that it doesn't return the realm it created when
starting WLS, I mean the one that served authentication and authorization.
But it create a new instance of this class (I knew it 'cos I put debug
message in its constructor). So how can I get reference to the realm
instance which is created when starting WLS ?
Thank you in an advance,
Siros

Hello again,
Sorry to say that now I've got the way. I post here again for someone who
may face that same problem.
So strange that, I just changed the realm name in below code to "custom" and
then it works !! My realm is extended from "AbstractListableRealm" class and
I think I named my realm as "XmlRealm" in it constructor by call
super("XmlRealm");
But seems like its "getName()" method always return "custom", so in servlet
code, it' rather be.
BasicRealm realm = Realm.getRealm("custom");
if (realm != null) {
Class realmClass = realm.getClass();
out.println("Realm is " + realmClass.getName());
This works fine and no instance of realm is created. Anyway I saw that
constructor of "AbstractListableRealm" take String argument for "name" of
the realm. So why it's always "custom" ???
Comments are welcome,
Siros
"Siros Supavita" <[email protected]> wrote in message
news:[email protected]..
Hello,
Says if I have alternative realm or my custom realm which implement
"ManageableRealm" interface. How can I access the realm from other
component, like Servlet or EJB in same WLS ? I tried using code like this
BasicRealm realm =
Realm.getRealm("XmlRealm","weblogic","myclass.DebugRealm");
if (realm != null) {
Class realmClass = realm.getClass();
out.println("Realm is " + realmClass.getName());
Which "myclass.DebugRealm" is classname of my own realm. This realm works
fine when using for authentication and authorization. But when I run this
code on servlet, it seems that it doesn't return the realm it created when
starting WLS, I mean the one that served authentication and authorization.
But it create a new instance of this class (I knew it 'cos I put debug
message in its constructor). So how can I get reference to the realm
instance which is created when starting WLS ?
Thank you in an advance,
Siros

Similar Messages

  • How to access report designer in customer system

    How to access report designer in customer system as we dont have direct acces to Customer BI System. Is there sny transaction code for report designer/web application designer or we can go through RRMX.
    Thanks in Advance.

    Hi
    If I got your question properly, You need authorization for the accessing Client System. You can see the Reports at RSRT , RRMX may also lead to Query Analyser.
    Hope it helps

  • How to access the java stack table "xi_af_msg" from the ABAP engine.

    Hello Guys,
    How to access the java stack table "xi_af_msg" from the ABAP engine.
    I need to access this table.

    These 3 are the tables that are for XI Adapter in ABAP Stack.
    SWFRXICNT
    SWFRXIHDR
    SWFRXIPRC
    You can also try the following tables.
    SXMSAEADPMOD                   XI: Adapter and Module Information
    SXMSAEADPMODCHN                XI: Adapter Module Chains
    SXMSAEAGG                      XI: Adapter Runtime Data (Aggregated)
    SXMSAERAW                      XI: Adapter Runtime Data (Raw Data)
    Cheers,
    Sarath.
    Award if helpful.

  • How to call & pass values to custom page from seeded page table region

    Hi All,
    can anyone tell me how to call & pass values to custom page from seeded page table region(Attribute is not available in seeded page VO)
    it is urgent. plssss
    Regards,
    purna

    Hi,
    Yes, we do this by extending controller, but you can also try this without extending controller.
    1. Create Submit Button on TableRN using personalization.
    2. Set "Destination URI" property to like below
    OA.jsp?page=/<yourname>/oracle/apps/ak/employee/webui/EmpDetailsPG&employeeNumber={@EmployeeId}&employeeName={@EmployeeName}&retainAM=Y&addBreadCrumb=Y
    Give your custom page path instead of EmpDetailsPG.
    EmployeeId and EmployeeName are VO attributes(Table Region)
    If you dont have desired attribute in VO, then write logic in your custom page controller to get required value using parameters passed from URL path.
    In this case, only personalization will do our job. Hope it helps.
    Thanks,
    Venkat Y.

  • How to  access the ORACLE APPS table structures from SAP

    Hi Experts,
        How to  access the ORACLE APPS table structures from SAP? Is it possible from SAP?
    Thanks in advance
    Thomas

    Hi Silviya,
    you can access this database using a technique called DB Multiconnect - sometimes written as multi-connect.
    Search the SAP documentation and notes for this term and you will find how to do it.
    Essentially you configure the remote database connection via transaction DBCON.
    If your SAP system is not running on Oracle you will need to install the db-specific kernel files for Oracle along with the Oracel db client software - SQL*Net.
    Then you can access the Oracle database from ABAP using native-SQL. It works a treat!
    Cheers
    Graham Robbo

  • How to Access the value(Ex: Delivery no) From Web to R/3 side.

    How to Access the value(Ex: Delivery no) From Web to R/3 side.
    Any sample code please suggest.
    sai

    Hi,
    Try RSA3.
    Extract Checker
    /people/sajeed.ms/blog/2006/02/12/extract-checker
    Thanks,
    JituK

  • How to access JNDI tree of Admin Server from Managed Server

    Hello,
    I created Managed and Admin Server for Domain.
    On Managed Server I use:
    InitialContext con = new InitialContext()
    It points to Managed Server local JNDI tree and
    Managed Server can't find JNDI tree of Admin Server.
    Looks like Managed Server is regular remote client of Admin Server.
    How to access JNDI tree of Admin Server from Managed Server?
    Thanks.
    Oleg.

    Hello,
    I created Managed and Admin Server for Domain.
    On Managed Server I use:
    InitialContext con = new InitialContext()
    It points to Managed Server local JNDI tree and
    Managed Server can't find JNDI tree of Admin Server.
    Looks like Managed Server is regular remote client of Admin Server.
    How to access JNDI tree of Admin Server from Managed Server?
    Thanks.
    Oleg.

  • How can I keep photos on iPod Touch from looking like color negatives?

    How can I keep photos on iPod Touch from looking like color negatives?

    You don't have to keep your photos in iPhoto to sync to your iPod according to Apple's website which states you can sync from folders in other locations:
    "Syncing Photos from a Mac
    To sync photos from iPhoto or a folder on your Mac:
    1. Connect your iPod to your computer and open iTunes.
    2. Select your iPod in the DEVICES section of the iTunes Source list.
    3. In the main iTunes browser window, select the Photos tab.
    4. Select the checkbox labeled "Sync photos from" and then choose either iPhoto, Aperture, Choose Folder, or Pictures, from the menu.
    * If you choose iPhoto, select "All photos and albums" to copy all of your photos in iPhoto, or "Selected albums only" and select individual rolls or albums you want to include.
    * If you choose Choose Folder, navigate to and select the folder of photos you want, then click Choose. Select "All photos" to copy all photos in the folder, or choose "Selected folders" to sync particular subfolders.
    * If you choose Pictures, choose "All photos" to copy all photos in the folder, or choose "Selected folders" to sync particular subfolders.
    5. If you want iTunes to also include the full-resolution versions of your photos, select the "Include full-resolution photos" checkbox. To access full-size photo files, be sure to enable your iPod for disk use.)
    6. Once you have decided which photos you'd like to sync, click Apply."
    Hope this helps!

  • How to access and display a Web Service from a WSDL in JSP or JSTL ?

    Dear All,
    We need to access a Web Service which is hosted as WSDL How to access a WSDL file from JSP or JSTL, parse and display the SOAP response in JSP page.
    Any simple example or URL as reference to an example will be useful for me.
    It seems io tags of jakarta is able to send soap message, but how to display it in JSP.
    Yours,
    Sankar.B

    Dear Sir,
    Yes. I would like to know more about the Forte and how to consume WSDL file from JSTL. The following are my querirs.
    1. How to connect the declared JNDI from a JSP page. i.e: the Datasource - ex: booksDS
    2. We connect the Tomcat server using JNDI as jdbc/scott. But, if I give jdbc/scott in JSTL as datasource={jdbc/scott}, we could not able to connect. We use the following code in a JSP page to connect the DB from a JSP page. (Its quite easy to modify, so we use the connection in a JSP page.)
    3. How to Consume a WSDL url from JSTL. Ex: If there is a URL : http://localhost/ws/MathService.asmx?wsdl OR http://www.xmethods.com/test/BabelFish
    4. How to display the result. We tried via SOAP from io taglib of Jakarta, but gives us an SOAP (it also looks like xml) response. But, how to use the value from that soap response in IE client thru JSTL/JSP.
    5. Whether this JSTL tool will be available with Forte Enterprise/Community Edition. If so EE, whats the price.
    Please Reply Immediatly. We tried, trying, going to try to display a wsdl response, but not able to display in IE thru JSP/JSTL. But, weve tested the www.gotdotnet.com examples of asp.net web services, we are thru. Its quite easy it seems in .NET. But, we feel whether even there is not even one example in JSTL/ Java Web Services Dev. Pack to utilise a web service in full cycle. The example which uve given is thru servlets. We dont use servlets. Cos, its very easy to edit JSP pages, instead of compiling the serv. and using it.
    I hope ull reply for all the above queries, since ur from SUN.
    Expecting your fav. reply.
    Yours,
    Sankar.B

  • How to access methods in existing dll file from java

    I have a dll file and that file contains two methods.
    Now I would like to access those two methods in java program.
    How to access these methods.
    Give me the sample code for this problem.

    http://forum.java.sun.com/thread.jspa?threadID=757125&tstart=0

  • How to access my video stream on icloud from mac

    I have pictures and videos on my shared stream that I took/recorded from my iPhone 5S. I don't know how to access these files from may MacBook Pro because I want to move these files to my hard drive on my MacBook Pro. Please help. Thank you!

    iCloud requires OS X 10.7.5 or higher, and iCloud photo sharing (which includes shared videos) requires OS X Mavericks v10.9 and either iPhoto '11 version 9.5 or Aperture 3.5.  Without these, you can't access the shared stream videos on your Mac.  However, at the present time you cannot save a shared video from a shared stream anyway, you can only view it.  If you want it on your Mac you’ll need to import the video to iPhoto from your camera roll using your usb cable as explained here: http://support.apple.com/kb/HT4083.

  • 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 I connect to a custom CMS from FrameMaker Connenction Manager?

    Hello,
    I am using the Adobe Technical Communication Suite 5 and was wondering how
    I can connect to a custom CMS, using the Connection Manager in FrameMaker 12.
    Is there a write-up on  making custom connections anywhere?
    Thanks,
    Jim

    See:
    http://blogs.adobe.com/techcomm/2012/09/open-source-sample-connector-between-framemaker-11 -and-adobe-cq-now-available.html
    How to build a connector between your CMS and FrameMaker 11? New CMS API documentation now available! « Technical Commun…
    Framemaker Developer Center | Adobe Developer Connection [See third section down (CMS Connector)]

  • How to access to SSO username and password from JPDK

    Hello
    Does anybody know how to access, from Java PDK, to SSO username
    and password of user, currently connected to portal.
    Thank's,
    Tomaz Podbersic

    The portal user's password is one way hash algorithm (MD5) that
    cannot be reversed.
    What you'll have to do is setup a "External Application" and
    save an alternate username/password profile in that area. It
    requires the user to first enter that data (but only 1 time) the
    first time into that application.
    ===========================================
    <HELP NOTE>
    If anyone knows of an API to populate those tables when seeding
    or creating the user names to also seed or create the "external
    applications" user /pass this would be helpful.
    ============================================
    JSP java code:
    ====================
    PortletRenderRequest portletRequest = (PortletRenderRequest)
    request.getAttribute (HttpProvider.PORTLET_RENDER_REQUEST);
    ProviderUser myUser=(ProviderUser) portletRequest.getUser();
    =====================
    From this object instance you can get the user's name, and other
    Portal session info. NOT password.
    The External Application username & password is a bit more
    tricky to get.
    see:
    SQL Login Problems

  • How to access an Oracle Lite 10.2 from native VC++ 2005 mobile app

    Hi,
    I'm developing a MS VC++ 2005 mobile app than will run on Mobile 5 ARM devices. This app needs to connect to an Oracle Lite 10.2 Lite database that is currently installed on those devices.
    I know that the MFC and ATL libraries are not "fully" supported on the mobile platform I need, so I need a way to connect to the Lite database, as those libraries don't provide that kind of functionality.
    I've been looking around for ways to connect to a Lite Database using VC++ 2005 native, but nothing seems to work!
    I've tried SODA but I simply couldn't connect to the database. After that, I've tried OLEDB, as I folowed articles on adapting MFC oledb.h to the mobile platform. Useless, because the articles focused only SQL Server CE.
    Anyone can give me a clue how to access the lite database from VC++ 2005?
    Isn't there any library like the Oracle.DataAccess.Lite_wce.dll for the CF.NET I can use?
    Thanks in advance.
    -- Manuel Costa

    Marc,
    Where can I find those libraries? Are they available to download in the Oracle site?
    The SODA Api has very few documentation, only an Oracle HTML document.
    Do you know any links with useful tips and examples I can use?
    By the way, the Soda API I tried implemented the try-catch exception handling using a special lib (not the try-catch available in the standard VC++ 2005). Has this been changed in the more recent versions you pointed out?
    Thanks in advance.
    -- Manuel

Maybe you are looking for

  • Rules File Not Running in EPMA During Consolidation

    Greetings - I am doing a migration from 11.1.1.2 to our Production environment in 11.1.1.3. We are using EPMA, though I wrote and maintain the rules files in the old editor and import them to the calc manager. I have exported and imported the metadat

  • Creating a function having a ref cursor returned

    I get an error message for the following code below. I am trying to create a function that allows the users to pass in a certain parameter which is used to invoke a specific query for the paramented passed in. Once the query is invoked, it should ret

  • Image on Button

    I am creating a Free-Standing Application using FRAME. As I want to improve the friendiness of my button, instead of using text over the button, I intend to use some picture image. I have been trying hard to work the code out but to no avail. May I e

  • Finder sorts files as Kind not correct

    Please help me. I recently purchased a new MBA 13" running ML. When put Finder to view files as Kind, it separates files as movies, documents and PDF files etc. But it seems to cannot differentiate between images files and other documents. It combine

  • Saving to the Server from an Applet

    Hi all, I've posted a message similar to this before, but didn't get too far. I need to get an applet to be able to open a new browser window and display a web page containing two images from the applet, and several strings from the applet. I need th