Creating logical/virtual connection object  from physical connection

Can anybody help me what is creating logical/virtual connection object and how to create it from physical connection in java ??
Thanks in advance...

WHile you are waiting for an answer, you might want to review the related Oracle documentation:
For 10g, all docco is at http://www.oracle.com/pls/db102/portal.portal_db?selected=3 and docco I suspect will help you is "Java Developer's Guide" and "JDBC Developer's Guide and Reference"

Similar Messages

  • Connection object from application module

    hi
    i was wondering if there is someway to retrieve the Connection object from the application module. something like:
    java.sql.Connection conn = appMod.getConn();
    i'm using JDeveloper 9.0.3.4
    Thanks in advanced
    Vitor

    Take a look at
    http://radio.weblogs.com/0118231/2004/01/30.html#a232
    Sascha

  • Creating an arrays of objects from a class

    I was wondering does any one know how to create an array of objects from a class?
    I am trying to create an array of objects of a class.
    class name ---> Class objectArray[100] = new Class;
    I cant seem to make a single class but i need to figure out how to create an array of objects.
    I can make a normal class with Class object = new Class

    There are four lines of code in your for-loop that actually do something:
    for(index = 0; index < rooms.length; index++) {
    /*1*/  assignWidth.setWidth(Double.parseDouble(in.readLine()));
    /*2*/  rooms[index] = assignWidth;
    /*3*/  assignLength.setWidth(Double.parseDouble(in.readLine());
    /*4*/  rooms[index] = assignLength;
    }1.) Sets the width of an object, that has been instantiated outside the loop.
    2.) assigns that object to the current position in the array
    3.) Sets the width of a second object that has been instantiated outside the loop
    4.) assigns that other object to the current position in the array
    btw.: I bet you meant "assignLength.setLength(Double.parseDouble(in.readLine());" in line 3 ;)
    Since each position in an array can only hold one value, the first assignment (line 2) is overwritten by the second assignment (line 4)
    When I said "construct a new room-object and assign it to rooms[index]" I meant something like this:
    for(index = 0; index < rooms.length; index++) {
        Room aNewRoom = new Room();
        aNewRoom.setWidth(Double.parseDouble(in.readLine()));
        aNewRoom.setLength(Double.parseDouble(in.readLine());
        rooms[index] = aNewRoom;
    }1.) Constructs a new Object in every iteration of the for-loop. (btw: I don't know what kind of objects you're using, so this needs most likely modification!!)
    2.) set the width of the newly created object
    3.) set the length of the newly created object
    4.) assign the newly created object to the current position in the array
    -T-
    btw. this would do the same:
    for(index = 0; index < rooms.length; index++) {
        rooms[index] = new Room();
        rooms[index].setWidth(Double.parseDouble(in.readLine()));
        rooms[index].setLength(Double.parseDouble(in.readLine());
    }but be sure you understand it. Your teacher most likely wants you to explain it ;)

  • Record Management: get logical document object from physical doc. object

    Hello,
    I'd like to get logical document from physical document (sdok object - stricture containing class and objid).
    There is BAPI for "opposite direction": SDOK_LOIO_PHYSICAL_OBJECT_GET. By this FM I can get physical document's sdok object from logical document's sdok object.
    Can anybody tell me BAPI's name for it?
    I tried SDOK_PHIO_LOGICAL_OBJECT_GET, but this BAPI doesn't exist.
    Best regards,
    Josef Motl

    Josef,
    There are I don't believe there are any bapi's for this. You probably have to do this via ABAP OO. Create an object of the type CL_SRM_DOCUMENT. This is your logical (LOIO) object of your document. You have to enter the documentclass and the objectid of the document. This class has a method get_variant. This variant is your fysical (PHIO) object of the document. Use version and variant 0 so you will get the latest version object of your document.
    If this isn't the answer, can you please explain where do you get the fysical object from if you haven't got the logical first?
    Regards,
    Tjalling-Jan

  • Obteain connection object from application module

    Hello
    I am working with ADF 10g using BC4j , I am in application module implementation class, how can I obtain the java.sql.connection object used by my application module?

    to execute prepared statements follow
    http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen005.htm#sm0297
    to access the SQL connection itself (for whatever reason)
    Re: how to get connection from adf bc?
    Frank

  • Connection Object from devices FM

    hi all,
    Is there any function Module that can be used to retrieve the connection object for a device.
    regds,
    stock

    Hi stock,
          Use ITOB_FUNCLOC_READ_SINGLE by inputing device in I_FUNC_LOCATION field. The resulting connection object will be in the export parameter E_OBJECT_REC. ie E_OBJECT_REC-TPLMA will be your connection object.
    Please reward points if useful.
    Regards,
    Harikrishna.

  • Creation of logical standby in 9i from physical standby

    Hi all,
    I want to create logical standby from physical standby in 9i. can anyone send a doc for this

    As per the Oracle documents "You create a logical standby database by first creating a physical standby database and then transitioning it to a logical standby database"
    Please take a look at the below URL.
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14239/create_ls.htm
    Regards,
    Sabdar Syed.

  • Could not retrieve connection info from torque connection pool

    Hi,
    I am using Apache Torque for making connection with my Oracle 9i server.
    My Torque.properties file configuration is as follows:-
    torque.dsfactory.cpm.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
    torque.dsfactory.cpm.pool.maxActive=10
    torque.dsfactory.cpm.pool.maxWait=60
    torque.dsfactory.cpm.pool.testOnBorrow=true
    torque.dsfactory.cpm.pool.validationQuery=SELECT 1 from dual
    torque.dsfactory.cpm.connection.driver = oracle.jdbc.driver.OracleDriver
    I am getting the following error:-
    Caused by: org.apache.commons.dbcp.SQLNestedException: Could not retrieve connection info from pool
    at org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:169)
    According to me the cause of error is because of the database connection was not available in the connection pool. Or it might be due to The connection was not closed properly becuase of the some issue in the persistent layer.
    My Research till now:-
    Checked all the connection object properly closed in my classes as well as Torque Classes.
    Do anyone have any idea regarding this error. If yes, please suggest some solution for it.
    ----Anurag----

    Hi,
    I have my complete Torque.properties file, just for the reference, I have pasted few lines from my torque.properties file. Secondly, I am using the JDBC Driver for my oracle connection & its working fine. The problem is when my application tries to access connection from connection pool, & if it finds no connection in the pool it gives error. After increasing the size of the connection in the pool, still I am getting the same error. Do you have some idea regarding this.

  • Formatted .data file, reading in and creating an array of objects from data

    Hi there, I have written a text file with the following format;
    List of random personal data: length 100
    1 : Atg : Age 27 : Income 70000
    2 : Dho : Age 57 : Income 110000
    3 : Lid : Age 40 : Income 460000
    4 : Wgeecnce : Age 43 : Income 370000
    and so on.
    These three pieces of data, Name,Age and Income were all generated randomly to be stored in an array of objects of class Person.
    Now what I must do is , read in this very file and re-create the array of objects that they were initially written from.
    I'm totally lost on how to go about doing this, I have only been learning java for the last month so anyone that can lend me a hand, that would be superb!
    Cheers!

    Looking at you other thread, you are able to create the code needed - so what's the problem?
    Here's an (not the only) approach:
    Create an array of the necessary length to hold the 3 variables, or, if you don't know the length of the file, create a class to contain the data. Then create an ArrayList to hold an instance of the class..
    Use the Scanner class to read and parse the file contents into the appropriate variables.
    Add each variable to either the array, or to an instance of the class and add that instance to the arraylist.

  • Can we create a BAM data Object from two tables

    Hi ,
    I want to pull the data from two tables and create a BAM data object, Is it possible in BAM?
    Do the needful
    Regards,
    Francis

    The sample way is using AQ on database. You can create a database view to join the tables. And create AQ on the view, create a ems to listen on the queue.

  • Xserve ethernet ports shows connected though no physical connection

    Hi all...
    We have a very strange issue in the 3 latest xserves (with Nehalem processors)that is purchsed couple of days back. The issue is, in the Network, System preference, both the ethernet ports shows green and displays as "Connected" even though there is no physical connectivity. This active state of the eth ports is visible only in the network system preference and the port state shows as inactive if we check through CLI and the server monitor. Both the ports functions normally except for these wrong info in the system preference.
    Have anyone faced any issue with the latest Nehalem processor Xserves or is this be a bug in the OS X. The installed OS version is 10.5.7 and the firmware is up to date.
    Please help !!
    Message was edited by: SREEKAR

    Call Apple Support for assistance; this looks to be a nasty error with multiple new Xserve boxes and given these are likely covered under their initial warranty, which implies there's something seriously weird with 10.5.6 or 10.5.7, or with the Xserve early 2009 boxes, or firmware, or with what the configuration tools allow.
    It appears that [threadID=2021235|http://discussions.apple.com/thread.jspa?threadID=2021235] and [threadID=2021817|http://discussions.apple.com/thread.jspa?threadID=2021817&tst art=0] are the same case?

  • Can I create a SOAP message object from a string?

    can i create a soap message object in saaj with a string containing soap xml?
    I know messageFactory has a constructor that
    public abstract SOAPMessage createMessage(MimeHeaders headers, InputStream in)
    does anyone know how to use this? Specifically transform a SOAP message in string format to something i could pass this constructor.
    Is there a better way to do this?
    I'm not EVER going to use apache's tomcat or GLUE or anyting and need to send a soap message from a client to a server via SOAP. I need to be able to transfer a String SOAP document to something i can search for elements with.

    sorry for being critical but the tutorial you just linked to is for the most part USELESS. it doesnt deal with Java just what a SOAP message looks like. yeah, i get it, its like xml. now how do i do what i want to with saaj?
    something like
    String sm;
    sm = in.readLine(); //gives me a whole SOAP document (pretend)
    sm--->>>MAGIC------>>>>>MIMEHeaders headers & InputStream sm_in
    MessageFactory factory = MessageFactory.newInstance();
    SOAPMessage message = factory.createMessage(headers, sm_in);
    SOAPBody soapBody = message.getSOAPBody();
    Name bodyName = factory.createName("YUP","m","http://theinternet/YUP");
    Iterator iterator = soapBody.getChildElements(bodyName);
    SOAPBodyElement bodyElement = (SOAPBodyElement)iterator.next();
    String yup = bodyElement.getValue();
    System.out.println("YUP element of the SOAP document is " + yup);what is the MAGIC in the above code?

  • Passing Connection object from web tier to ejb tier

    I am having a multi threaded application where i am creating multiple threads and doing ejb lookup in each thread and there in ejb it is creating a database connection.
    But i wish to pass only a single connection so that total no of free connections will be more.
    i am creating a connection in my web tier and passing it in each thread and then to ejb tier. But i am getting a class cast exception
    java.lang.ClassCastException: com.sun.gjc.spi.ConnectionHolder
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl$14.write(DynamicMethodMarshallerImpl.java:338)
         at com.sun.corba.ee.impl.presentation.rmi.DynamicMethodMarshallerImpl.writeArguments(DynamicMethodMarshallerImpl.java:407)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.privateInvoke(StubInvocationHandlerImpl.java:157)
         at com.sun.corba.ee.impl.presentation.rmi.StubInvocationHandlerImpl.invoke(StubInvocationHandlerImpl.java:119)
         at com.sun.corba.ee.impl.presentation.rmi.bcel.BCELStubBase.invoke(BCELStubBase.java:197)
    Please give some insight where i am doing wrong also suggest me a better way to do it.
    TIA
    ~seshu

    Hi Krishendu,
    I think this is a bug in 9.0.2 that is fixed in 9.0.3/9.0.4.
    Can you please contact Oracle support and see whether they can provide a patch for this problem.
    regards
    Debu

  • How to create multiple TYPES of objects from one menu?

    Q: How can I create a single class to create objects of multiple 'object classes' in a way that is not a huge switch statement?
    Explaination:
    Let's say that I have an application that I am building, that manages five hundred object types. A properly-built object subclassing tree is created, and I want to be able to create objects of any 'leaf node' of this subclassing tree using a single 'objectCreate()' method in a 'factory object'. The purpos of this method will be to create an instance of the correct object, pass a handle to a few collections for properly sorting and storing these objects in groups.
    Usually, one could create a switch in this function, testing for the type of object that the user wants to create from the menu. But in the case of having hundreds of possible object choices, this becomes harder and harder code to maintain (let alone performance).
    Any suggestions?

    But if my menu has:
    1. German Shepard
    2. Doberman Pinscher
    3. Malamut
    4. Persian Long-hair
    5. Siamese
    6. Tabby
    And my object class tree goes:
                                  [ Animal ]
                 [ Cat ]                              [ Dog ]
      [ various breeds ]                         [ various breeds ]How do I code the menu class to respond to the input, so that it runs the correct [breed] object's constructor?
    The line:
    Animal choice = new xxxxxxxx();
    I can't use a variable to replace 'xxxxxxxx' in run-time, but having a ton of choices in code sounds/looks unreasonable.
    if (choice == "Doberman Pinscher")
    Animal choice = new doberman();
    else if (choice == "Tabby")
    Animal choice = new tabby();
    Do you see what I am trying to avoid? I am not experienced enough to instantly realize how to avoid the latter, and instead, do a single instantiation command for the correct constructor.

  • Creating new instances of objects from external classes

    Hello!
    I have a number of classes, in particular a 'room' class and a 'player' class. I've just made them as simple classes with a couple of fields and a few accessor and mutator methods.
    I have a 'start' class, and at the moment it has the heading:
    public class start extends room {  This is working fine, as I have been able to create an array of rooms and use the room object's roomName method for each room to name it. But now I also want to create a new player:
    player player1 = new player;But I don't know how to do that. I'm fairly new to Java and have been working from web tutorials and textbooks, but am still not quite used to the very 'universal' format of the code (i.e it just uses generic terms instead of actual examples of real-life situations).
    If someone can help me with a simple way of having both the room and player class available for new object creation I'd be most grateful. My compiler cannot seem to create the new player as there is no direct link to that class.
    Cheers.
    Hussein.
    "Simplicity is appreciated."

    You keep posting these basic questions and asking for simple answers. Well, learning Java is not a simple task. You need to start at the beginning of a long road and take many steps, one at a time. May I suggest one or more of the following:
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoratative than this.

Maybe you are looking for