Read configuration data source AM from Java Bean code

Hi experts,


I use Jdev 12.1.3 and I need to read the name of AM Datasource from Java Code, to get a text like "jdbc/nomsourcededonnees.


Is this possible?

Thank you very much
Jose.

This object has methods getURL(), getUser() and others.

But there is no method as getDataSourceName()

(AFAIK, jdbc connection "knows" nothing about the Data Source)

You can try something like this inside your AppModuleImpl class:

this.getSession () .getEnvironment () .get (Configuration.JDBC_DS_NAME)

Dario

Tags: Java

Similar Questions

  • Computer laptop Gateway does not load windows Vista, reads configuration data read error: System.

    OK a friend knows me to fix his laptop. Apparently what she was experiencing major problems, so he erased the disc and tried to reinstall Win Vista from disk. Will not work. I can get to where you can choose a partition to install the operating system to, and it says: Windows cannot find a system volume that meets its criteria for installation. My friend says he has just tried, form disassemble the computer an audit of all the parties to try ALL the different options during installation, as well as the options for the BIOS. Any ideas people? Here are the approximate specifications, because the owner has not been able to get the computer working for awhile:
    4 GHz, 4 GB RAM computer Gateway laptop, 2006, Phoenix TrustedCore, and a string of other interesting info that appears on the first screen of the error:

    9D.03 BIOS version

    632K RAM passed system
    3966M extended RAM passed
    1024 KB of L2 Cache
    System BIOS with a shadow
    Video BIOS with a shadow
    ATAPI CD-ROM: Optiarc DVD RW AD-7563 has
    Fixed disk 0: WDC WD2500BEVS-26VATO
    Initialized the mouse
    Updated System Configuration data
    ERROR
    System Configuration data read error.

    I'm not very tech savy and I'm not the owner of the PC, so I don't know all about it so go easy on me :).

    If your friend tried to reinstall Windows by using the defined gateway recovery disc (and this is the best way) and this recovery fails, the laptop has hardware problems. Disassemble laptops is a fickle business at best and while it sounds like the hardware problems started before your friend did this, it may have put the nails in the coffin of the laptop to take apart.

    At this point, you can try troubleshooting hardware or your friend can take the laptop to a competent professional (not a type of BigComputerStore/GeekSquad of the place). However, if the laptop has had hard use, your friend must remember that a cell of 4 years with major hardware problems probably won't be cost effective to repair.

    http://www.elephantboycomputers.com/page2.html#Hardware_Tshoot MS - MVP - Elephant Boy computers - don't panic!

  • Groovy in Java bean code

    Hello

    I want to use an expression goovy in my Java bean. adf.context.securityContext.getUserName)

    Can anyone help how can use it in my grain of java. I use that way, but he's back just a string instead of the current user.

    String currentUserName = "${adf.context.securityContext.getUserName ()};  Thank you

    Why you did not say that from the beginning. Try this code

    public String getBpmUserName()
      {
        FacesContext context = FacesContext.getCurrentInstance();
        String ctx = (String) context.getApplication().evaluateExpressionGet(context, "#{pageFlowScope.bpmWorklistContext}", String.class);
    IWorkflowServiceClient workflowSvcClient = ADFWorklistBeanUtil.getWorkflowServiceClient();
        ITaskQueryService wfQueryService = workflowSvcClient.getTaskQueryService();
        IWorkflowContext wfContext;
        String userName = "";
        try
        {
          wfContext = wfQueryService.getWorkflowContext(ctx);
          userName = wfContext.getUser();
          System.out.println("userName= " + userName);
        }
        catch (WorkflowException e)
        {
    e.printStackTrace();
        }
        return userName;
      }
    
  • Complex "validation rule" using Java Bean code

    Hello

    I've never used with jdeveloper validation rules, but I need a complex validation rule to a column of my table.

    Can I put a 'validation rule' on an attribute of an object of display or on a column in a table, using the Bean code?

    My column must contain different values depending on the other columns in the table, so I think I can't do this without java code...

    I tried to doubleClick on column to create a validator, but I put a 'printing' inside and saw that running many times, but I want to run validation only when the value of the column change!

    How can I do this? What should I use?

    Kind regards
    Trigger

    Trigger,

    If you want to validate an attribute that is dependent on another attribute - you must upgrade the VO (or EO), not at the level of the attribute. You can write a validator method (which is a Java method) to achieve this. I don't think that nini will work for postings that depend on several attributes.

    John

  • Graphic design of data sourcing XML from a database

    Hi all

    I try to display a histogram with Source such as an XML that is generated from a database using PHP. Some how I get errors... Is it possible to do that... He... If so how should it be done.

    This table exists in MYSQL

    CREATE TABLE "project1". "bubble_graph")
    Varchar (45) 'Product' NOT NULL default ",
    int (10) 'delivery' unsigned zerofill NOT NULL,.
    int (10) unsigned zerofill NOT NULL ' delay'
    ) ENGINE = InnoDB DEFAULT CHARSET = latin1;


    INSERT INTO bubble_graph VALUES ('IteamA', 20, 2);
    INSERT INTO bubble_graph VALUES ('IteamB', 20, 8);
    INSERT INTO bubble_graph VALUES ('IteamC', 20, 1);
    INSERT INTO bubble_graph VALUES ('IteamD', 20, 6);
    INSERT INTO bubble_graph VALUES ('IteamE', 20, 15);
    INSERT INTO bubble_graph VALUES ('IteamF', 20, 3);
    --------------------------------------PHP----------------code
    <? PHP
    Define ("DATABASE_SERVER", "localhost: 3306 ');
    Define ('DATABASE_USERNAME', 'root');
    Define ("DATABASE_PASSWORD", "yyyyyyy");
    Define ('database_name', 'Project1');

    connect to the database
    $mysql = mysql_connect (' localhost: 3306 ', 'root', 'yyyyyy');

    @mysql_select_db (DATABASE_NAME);

    Returns a list of all users
    $Query = ' select Product, round (delivery) as delivery, round (delay) in the time of bubble_graph ";
    $Result = mysql_query ($Query);

    $Return = "< root >."

    While ($User = mysql_fetch_object ($Result))
    {
    $Return. = "< Data > ';
    $Return. = "< data". " Product =------"". " $User-> product. » \ "> » ;
    $Return. = '< product >. $User-> product. "< / product > ';
    $Return. = "< delivery >." $User-> delivery. "< / delivery > ';
    $Return. "< delay > =. $User-> delay. "< / delay > ';
    $Return. = "< / data > ';

    }
    $Return. = "< / root >;
    mysql_free_result ($Result);
    print ($Return)
    ? >
    ++++++++++++++++++++++++++++++Flex code+++++++++++

    < mx:ColumnChart id = "table" dataProvider = "{results}" showDataTips = "true" width = "513" height = "286" type = "grouped" x = "0" y = "31" >
    < mx:horizontalAxis >
    < mx:CategoryAxis dataProvider = "{results}" categoryField = "Product" / >
    < / mx:horizontalAxis >

    < mx:series >
    < mx:Array >
    < mx:ColumnSeries yField = 'period' name = 'time' / >
    < mx:ColumnSeries yField = 'delivery' name = 'delivery' / >
    < / mx:Array >
    < / mx:series >
    < / mx:ColumnChart >


    Consider this, your code is far away. Your idea is fundamentally correct, but take a look at one, I built. This actauly return xml from a database published on a page and access to the page & data using the correct data aggregate query string values. Look closley the code using im to organize the results.


    http://www.Adobe.com/2006/mxml"layout ="absolute"backgroundGradientColors ="[#ffffff, #ffffff]"currentState ="stSalesByDate">


    Import the required namespaces
    Import mx.controls.Alert;
    import mx.validators.DateValidator

    var ResolveUrl:String = "";

    Initialization function manages the init program
    private function init (): void {}

    ResolveUrl = Application.application.parameters.ResolveUrl;

    }

    Valid entries and fires http service
    private function buildReports (): void {}

    var retVal:Boolean = isValidDates (dateStart.text, dateEnd.text);

    If (retVal == true) {}

    wService.send ();
    currentState = "stSalesResults";

    } else {}

    Alert.Show ("Please enter dates valid.', 'Invalid Date', Alert.OK");

    }

    }

    Manages the State switch Events for new reports
    private function newReport (): void {}

    currentState = "stSalesByDate";

    }

    Date comparison function handles to ensure deadlines are valid
    private void isValidDates(strStart:String,_strEnd:String):Boolean {}

    var blnIsValid:Boolean = false;

    If (strStart.length == 0 | strEnd.length == 0) {}

    blnIsValid = false;

    } else {}

    blnIsValid = true;

    }

    return blnIsValid

    }

    ]]>































    This code is called e4x he treats xml as a native object, search :)

  • "Database Config" vs "data source Configuration.

    In the Configuration utility for 9.3.1 What are the differences between "Database Config" and "data source Configuration.

    After running 'Config database' itl has created about 10 HSPsys_ * tables in the database of PLANSYS. It seems to me that this is where the planning and data source information instance are stored

    "Data source configuration. created about 30 HSP_ * tables in PLAN2.
    It seems that is where the application tables are stored, am I right?
    When you run "Configure data source", I shouldn't use PLANSYS database to store my tables for the application I'm good? Otherwise I would have problems with future migration, am I right?

    Hello

    Database config set up tables for the planning system to use this database schema / should be separated from the application planning.
    "Data source configuration" - configure just details about your connection to the planning application details, e.g. connections details to the repository and essbase. It stores this information in your planning system database.

    Once you create a planning application he uses the information from the data source to create the planning and application of all the tables in the database

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • EPMA 11.1.2.3 Interface Data Source

    When you configure the EPMA, I don't have the option to "Set up the Data Source Interface" in my 11.1.2.3 new facility.

    I installed 'PFMA Java Web Application' and PFMA data Synchronizer Java Web Application"on my server of Foundation. And I installed 'PFMA Dimension Server Service' on my 02 server.

    I missed something. Or things have changed for 11.1.2.3?

    Any help is appreciated.

    11.1.2.3 configuration data source must be available in the workspace, have a read of the Configuration of Interface Data Sources

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • Allow the application to start with one or multiple data sources, failing to connect?

    I have a Spring application that connects to several databases at the start, through JEE definitions referenced via JNDI datasource. Some of these databases sometimes go offline for various reasons. If the application is running at the time, it is not really dangerous, because of the way the application is designed. However, if I try to start the server if the database is offline, the application fails to deploy. Is it possible I can configure data sources not to block the deployment of the application if the database is offline or the application?

    Hello. You can ensure that your datasources WebLogic deployment, even if the DBMS (es)
    be down in time, specifying the initial capacity of each source of data/pool equal to zero.

  • Add a MS SQL data source error

    I just installed CF 10 on my Win 7 Home machine and tried to add a MS SQL Server data source and got following error.

    need to install a driver to add MS SQL Server as a data source?

    I'm able to add the MySQL database of MS SQL Server.

    Your information and help is much appreciated,

    Kind regards

    iccsi,

    Connection verification failed for data source: MyServer

    java.sql.SQLNonTransientConnectionException: error [Macromedia] [SQLServer JDBC Driver] establishing socket to host and port: MyServer:1433. Reason: Connection refused: connect

    The root cause was that: java.sql.SQLNonTransientConnectionException: error [Macromedia] [SQLServer JDBC Driver] establishing socket to host and port: MyServer:1433. Reason: Connection refused: connect

    I got it working now.

    Thanks for help and information.

    Kind regards

    Iccsi,

  • File access from Java resources

    Hello

    What is the best way to read a resource file using the Java extension code in a Widget application?  Should I put the resource file in the Widget project folder or in the Java project?  I'm reading a file as config.xml file using the Java Extension code.  I added the file to the Java at the highest level.  I got the name of the class

    CLASSS = Class.forName ("com.myApp.myclass");  is OK

    shabl wrote:

    a related question is: you can access the same file system with Java and Widget applications?  The Simulator shows folder root in Java is/system, while it shows with Widget like /store.  How can you map these two?

    Hi shabl,.

    The Widget/WebWorks API is identical to Java, a... It is built right on top of the Java

    I'm not sure that understand your question on how to map the two and that the Simulator shows something different for java?

  • Change the data source in my ApplicationModule

    Studio Edition Version 11.1.1.3.0

    I have the following problem:
    in WLS 10.3 I've defined three global DataSource (or several)

    and I have only a single ApplicationModule. Can I change the data source in my ApplicationModule (by code)?

    THX Thomas

    Envoy

  • The bean code is not activate when-custom-point-event trigger

    I wrote a java bean to read card reader Omnikey.  It works - almost.  When-custom-point-event is not fired.  Get the key of the reader in the java console, but then follows an exception.  The exeption complains, I believe, m_handler null variable in dispatchMessage() call which is what should be pulled when-custom-point-event in the form. I'm missing something minor and that everything works.  See Oracle Forms java console ATR key followed then path exception at the bottom of this post.  I have to FBean.Enable_Event.  What would be the name of the event listener?   I got the kifani of this example code: https://community.oracle.com/thread/68004------ this example isn't mention or implement a listener.  I just need to return the key and place it in a named text field: test.atr.

    a time new form instance

    FBean.Register_Bean('TEST.) CARD_READER_BEAN_AREA', 1, 'CardReader.CardReaderWrapper');

    FBean.set_logging_mode('TEST.) CARD_READER_BEAN_AREA', 1, FBEAN. LOG_ALL);

    button with when button pressed

    fbean. Invoke('TEST.) CARD_READER_BEAN_AREA', 1, 'main');

    When-custom-point-event

    DECLARE
    eventName varchar2 (30): =: system.custom_item_event;
    eventValues ParamList;
    number of eventValueType;
    tempString varchar2 (100);
    BEGIN
    IF (eventName = "CARDINFO_EVENT") THEN
    eventValues: = get_parameter_list(:system.custom_item_event_parameters);
    get_parameter_attr (eventValues, 'CARDINFO_DATA', eventValueType tempString);
    END IF;

    - Then do something with tempString...
    -for example
    -message ("payload has been: ' |") tempString);
    : test. ATR: = tempString;
    END;

    Java Bean code...

    package, card reader;

    import java.util.List;

    Javax.smartcardio import. *;

    Import oracle.forms.ui.VBean;
    Import oracle.forms.properties.ID;
    Import oracle.forms.handler.IHandler;
    Import oracle.forms.ui.CustomEvent;

    SerializableAttribute public class CardReaderWrapper extends kifani {
    Property registered under the name of the custom event
    Call it what you want...
    public static String strOut = null; used in part of the code ATR

    public static final ID CARDINFO_EVENT = ID.registerProperty ("CARDINFO_EVENT");

    Property to set the name of the parameter that contains the payload
    the event - for example your data
    public static final ID CARDINFO_DATA = ID.registerProperty ("CARDINFO_DATA");

    A reference to the Forms Manager associated with this component.
    It is used to send custom form events
    private IHandler m_handler = null;

    /**
    * Method of the oracle.forms.ui.IView class and substitute of the kifani
    * base class.  This life cycle method is called one time what forms creates a
    the instance of the JavaBean.
    *
    < B > @param Manager < /b > a reference to the handler for the JavaBean class.
    */
    {} public void init (Manager IHandler)
    Manager = m_handler;
    Super.init (Handler);
    }

    /**
    * Function to dispatch an event and the data payload
    * Return to forms
    * In this case, we use the pre-defined event and the IDs payload
    *
    @param payload < b > < /b > to return to the event data.
    */
    Private Sub dispatchMessage (String payload) {}
    try {}
    The CustomEvent = new CustomEvent (m_handler, CARDINFO_EVENT);
    m_handler. SetProperty (CARDINFO_DATA, payload);
    super.dispatchCustomEvent (this);
    } catch (Exception e) {}
    e.printStackTrace ();
    }
    }


    the rest of your bean code follows
    and calls the dispatchMethod() method, which precedes
    to contact forms

    Public Shared Sub main (String [] args) {}

    CRW CardReaderWrapper = new CardReaderWrapper();
    Plant of TerminalFactory = TerminalFactory.getDefault ();

    CardTerminals cardTerminals = factory.terminals ();
    The list < CardTerminal > cardTerminalList;

    try {}

    cardTerminalList = cardTerminals.list ();

    for (CardTerminal cardTerminal: cardTerminalList) {}

    If (cardTerminal.isCardPresent ()) {}
    Card card;

    try {}

    map = cardTerminal.connect ("T = 0");

    card.beginExclusive ();
    } catch (CardException e) {}
    strOut = ("8"); This card but with card error
    System.out.println (strOut);
    crw.dispatchMessage (strOut);
    continue;
    }
    ATR atr = card.getATR ();

    Byte [] atrBytes = atr.getBytes ();
    System.out.println ("0" + javax.xml.bind.DatatypeConverter.printHexBinary (atrBytes));
    strOut = '0' + javax.xml.bind.DatatypeConverter.printHexBinary (atrBytes);
    card.endExclusive ();
    Card.Disconnect (true);

    crw.dispatchMessage (strOut);
    }

    }

    } catch (CardException e) {}
    System.out.println("7"); no card reader not connected? ») ;
    crw.dispatchMessage("7");

    }
    If (strOut == null) {}
    System.out.println("9");
    crw.dispatchMessage("9");
    }
    }


    }

    Key to Java Console ATR with the Exception

    0 3B0500026E05BA

    java.lang.IllegalArgumentException: null source

    to impossible. < init >(Unknown Source)

    to oracle.forms.ui.CustomEvent. < init >(Unknown Source)

    at CardReader.CardReaderWrapper.dispatchMessage (CardReaderWrapper.java:48)

    at CardReader.CardReaderWrapper.main (CardReaderWrapper.java:97)

    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke (unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke (unknown Source)

    at java.lang.reflect.Method.invoke (unknown Source)

    at oracle.forms.beans.MethodHelperPM.invokeMethod (unknown Source)

    at oracle.forms.beans.MethodPM.setProperty (unknown Source)

    at oracle.forms.ui.VBean.setBeanProperty (unknown Source)

    at oracle.forms.ui.VBean.setProperty (unknown Source)

    at oracle.forms.handler.ComponentItem.setCustomProperty (unknown Source)

    at oracle.forms.handler.ComponentItem.onUpdate (unknown Source)

    at oracle.forms.handler.JavaContainer.onUpdate (unknown Source)

    at oracle.forms.handler.UICommon.onUpdate (unknown Source)

    at oracle.forms.engine.Runform.onUpdateHandler (unknown Source)

    at oracle.forms.engine.Runform.processMessage (unknown Source)

    at oracle.forms.engine.Runform.processSet (unknown Source)

    at oracle.forms.engine.Runform.onMessageReal (unknown Source)

    at oracle.forms.engine.Runform.onMessage (unknown Source)

    at oracle.forms.engine.Runform.processEventEnd (unknown Source)

    at oracle.ewt.lwAWT.LWComponent.redispatchEvent (unknown Source)

    at oracle.ewt.lwAWT.LWComponent.processEvent (unknown Source)

    at java.awt.Component.dispatchEventImpl (unknown Source)

    at java.awt.Container.dispatchEventImpl (unknown Source)

    at java.awt.Component.dispatchEvent (unknown Source)

    at java.awt.LightweightDispatcher.retargetMouseEvent (unknown Source)

    at java.awt.LightweightDispatcher.processMouseEvent (unknown Source)

    at java.awt.LightweightDispatcher.dispatchEvent (unknown Source)

    at java.awt.Container.dispatchEventImpl (unknown Source)

    at java.awt.Window.dispatchEventImpl (unknown Source)

    at java.awt.Component.dispatchEvent (unknown Source)

    at java.awt.EventQueue.dispatchEventImpl (unknown Source)

    at java.awt.EventQueue.access$ 500 (unknown Source)

    in java.awt.EventQueue$ 3.run (unknown Source)

    in java.awt.EventQueue$ 3.run (unknown Source)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)

    in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)

    in java.awt.EventQueue$ 4.run (unknown Source)

    in java.awt.EventQueue$ 4.run (unknown Source)

    at java.security.AccessController.doPrivileged (Native Method)

    in java.security.ProtectionDomain$ JavaSecurityAccessImpl.doIntersectionPrivilege (unknown Source)

    at java.awt.EventQueue.dispatchEvent (unknown Source)

    at java.awt.EventDispatchThread.pumpOneEventForFilters (unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForFilter (unknown Source)

    at java.awt.EventDispatchThread.pumpEventsForHierarchy (unknown Source)

    at java.awt.EventDispatchThread.pumpEvents (unknown Source)

    at java.awt.EventDispatchThread.pumpEvents (unknown Source)

    at java.awt.EventDispatchThread.run (unknown Source)

    Well... I solved this problem by making static m_handler.  Now I have another question.  I post another question...

  • Migrate from JNDI, data sources, and other configurations from one instance to another

    Hi all

    We are looking for scripts to migrate the basic configurations as JNDI Data Sources, queue connection factory, queue etc a weblogic instance to another instance. These scripts are available anywhere?

    Is there a standard way to migrate these configurations? Please suggest.

    Thank you and best regards,

    Vikas marzouk

    Thanks Vlad. Wil check this box.

    Kind regards

    Vikas marzouk

  • map a java object to data from multiple data sources

    We have the requirement that the attributes in a domain class can come from data from multiple data sources. Is TopLink supports this type of mapping? Is it possible to do this mapping in the workbench?

    Thank you very much!

    Ming-Wen

    TopLink supports a feature of SessionBroker. This allows classes in the same session to come from different sources of data and for the relations between the classes of data sources. It does not allow a single instance of direct data from multiple data sources, but the Forum could have a link with its data in the other data source.

    ----
    James: http://www.eclipselink.org

  • using beans from java forms

    Hello
    I want to import data from an excel file to oracle database. for this I find a java bean on:
    http://sites.Google.com/site/jvrexcelproject/version-1-5-1-English
    I have download.
    I put on forms/java jar files
    I ve change formsweb.cfg

    When I opened my form, you'll see a message:
    FRM-13008: cannot find JavaBean with the name 'oracle.forms.jvr.xls.Read '.
    Please help me,

    Thank you

    Hello

    You can avoid this message from design time by adding full classname in your CLASSPATH variable, but you can also do not mind this message. The most important would be that it works when running.

    François

Maybe you are looking for

  • Cell vs at &amp; T or Verison

    The last time I bought an iPad, I had to say AT & T or Verison.  But I'e noticed that when looking at refurbished iPad mini, the mini 2 indicate cellular service so that the mini 3 stipulates that "cell."

  • y at - it a trick to find the initial size of the photos

    I want to find the original size of the pictures that r send e-mail by compressing the photos that I receive in my mail... are compressed into one so how can we recover these photos to the original size...

  • 0x4b8 error code.

    I can not install IIS from Add and remove programs icon in Control Panel. You will be asked to insert the installation cd or specify another folder to copy from. Examination of the I386 folder, I discovered that all the files, it cannot locate are ac

  • Black screen with cursor on startup

    HelloI have a laptop HP Vista x 64 which is a little more than a year. My problem is that at the start, when the Green loading bar Microsoft ended, my screen goes black except for the slider, which I can move me around. Ctrl + alt + delete does nothi

  • Unarchive and archived email

    How to unzip and send an email that has been archived?