Client pool of connections to R/3

Hi,
I'm using this function to create a client pool:
JCO.addClientPool(C_CLIENTPOOL_NAME,
C_CLIENTPOOL_MAX_CONNECTIONS, C_ABAP_CLIENT, C_ABAP_USER,
C_ABAP_PWD, C_ABAP_LANG, C_ABAP_HOST, C_ABAP_SYSTEMNR);
Is there a way to avoid this pool being created by code in my application?
Is there some tool to define client pools as you can define JCo connections in the J2EE Content Administrator?
Or is it considered safe practice to have a plaintext password in the source code of an application?
Thanks,
Jeroen

Hi
You can use the property file for access the username and pasword.
See this samples and help for webdynpro
https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/f0b0e990-0201-0010-cc96-d7ecd2e51715
Kind Regards
Mukesh

Similar Messages

  • Connection pool and Connection factory difference?

    Hi,
    Can someone clarify the difference between connection pool and connection factory.
    I know connection pool is some thing like a pool of database connection manitained at one place so that an application or client can use it when it requires.
    Then wat exactly is connection factory..say in 10g we always put a connection factory name in all adapters and acces the data sources like DB ,FTP,AQ ..etc
    can someone clarify??
    regards,

    To conserve system resources and to improve the performance of transactional applications, WebLogic allows you to define a pool of client connections (generally database but may be a FTP,FILE etc. as well)
    A Connection Factory object encapsulates a set of connection configuration parameters that has been defined by an administrator. A client uses it to create a connection with a service provider (generally JMS).
    Regards,
    Anuj

  • JCO Client Pool

    Hi All,
            I have a situation where I'm supposed to initialize JCO Client pool at server startup(Weblogic 8.1). Could someone please let me know how to achieve this.
           Any pointers to documentation or sample startup servlet code would also be of great help!
    Regards,
    Chaitanya

    Abhilash,
    Thank you very much for the prompt response.
    <i>The better approach is write your own classe where all JCO related logic is maintained. And use that class to initialilze the pool in servlet and to get connection and release connection.</i>
    I couldn't get the gist of this, are we trying to invoke a startup servlet from an external class? My idea is to do as follows:
    1. Create a servlet that is intialized on server startup.
    2. In the init method initialize JCO client pool.
    3. Write a backend class something like <MyApp>BackendR3 and have a getConnection() inside.
        My question was, <b>could I directly use JCo.getClient method? in the backend class</b>.
    4. If yes, am I supposed to add a JCo jar during weblogic startup explicity or could it simply reside in web-inf/lib
    Thanks again,
    Chaitanya
    Message was edited by:
            chaitanya hazari

  • Anyconnect client and clientless connections hang for two users

    ASA 5525, v. 9.1(5)19
    Anyconnect client 3.1.02026
    I have two users who are unable to connect via the AC client or clientless through the web portal. Using the client, it will get stuck in a loop of "checking for updates". On the portal, the connection will proceed to the point of "Cisco Secure Desktop successfully validated... Success.. Reloading..please wait." Then it hangs there.
    The issue occurs for the user regardless of which company laptop she logs onto. A help desk tech can use her laptop and successfully connect, but she cannot connect on her own laptop or on another laptop. (Same for the other user.) So the issue doesn't seem to be related to her laptop or the AC installation. (Help desk did reimage her machine early in the troubleshooting process before they realized that the issue seemed to follow the user.)
    I've updated the hostscan file - no change in results.  Client and clientless connections seem to be working fine for all other users. We're stumped.  Suggestions, anyone?  thanks!

    The LDAP should be server folks -- Active Directory.  Chances are whoever manages the ASA's should have access to at least look in Active Directory to look that up.  If they don't they need it.
    I obviously don't know a lot about what devices you are using, but if you are using ISE, there should be some type of MNT device (Monitoring and Troubleshooting) -- which is collecting the logs and, hopefully, sending them to some type of syslog aggregate collection tool (splunk?).
    Otherwise, there should be a device called a CAM (Clean Access Manager) that is collecting logs -- which may also be propagated to a syslog aggregate tool -- although with CAM's, you can pull the reports right out of them in a comma deliminated file (.csv) and go through them that way.
    -- The thing that gets me is that it happens to two users no matter what computer they try to connect from, no matter what network they connect from, and other users can authenticate and gain network access on those same devices.
    -- That is why it is rather perplexing.  Pretty much saying it has to be something with:
    - the IP pool they are getting an IP from
    - their AD credentials
    - their username
    - something along those lines, if the information provided was fully accurate.

  • Free pooled db connections

    We've just enabled the PersistenceManager connection pooling, which is
    causing problems becuase we're leaking connections when we redeploy our
    webapp (we're using tomcat).
    I can have the servlet.destroy() method invoked when we're undeploying
    our app, how can I instruct kodo to close/free all pooled DB connections?
    thx,
    david

    We are using oracle and tomcat.
    "Alex Roytman" <[email protected]> wrote in
    news:b8u57c$gq0$[email protected]:
    I will package it and put on our web server over weekend. If you need
    it urgently I can email binaries and source to you now (no docs but
    tomcat config sample)
    What Database and web server are you using (if it oracle/tomcat I can
    supply samples of config files too)
    "Frank Riley" <Frank_Riley@NOSPAM|stchome.com> wrote in message
    news:[email protected]..
    Where can we get this?
    "Alex Roytman" <[email protected]> wrote in
    news:b8s528$fqe$[email protected]:
    Another option is to use external connection pooling component.
    I will be glad to offer our's - it is open source (but not
    published) the only requirement is JDBC2 compliant driver - it
    relies on JDBC2 and does not wrap JDBC1 drivers
    Our pooled datasource supports getConnection() and
    getConnection(user, password) pooling, different growth policies,
    eviction of failed connection without exposing exception to client
    (might depend on driver, tested with oracle) - so bad connection is
    disposed of and new one returned to the client, timer based
    eviction of idle connections from the pool (so it will gradually
    reduce number of idle connections in your pool to zero - very
    convenient for closing all connections during the night), plus
    management interface for getting pool statistics and clearing
    pool(s) as needed even for getConnection(user, password) pools
    designed to work in JNDI env. tested with tomcat4
    "David Michaels" <[email protected]> wrote in message
    news:b8k97c$qel$[email protected]..
    We've just enabled the PersistenceManager connection pooling,
    which is causing problems becuase we're leaking connections when
    we redeploy our webapp (we're using tomcat).
    I can have the servlet.destroy() method invoked when we're
    undeploying our app, how can I instruct kodo to close/free all
    pooled DB connections?
    thx,
    david

  • Connection Pooling and Connection Identity

    On this link:
    http://java.sun.com/products/jndi/tutorial/ldap/connect/config.html
    I read that: "The LDAP provider maintains pools of connections; each pool holds connections (either in-use or idle) that have the same connection identity."
    This to me suggested that if I am doing "simple" authentication then the "connection identity" consists of:
    1) connection controls
    2) host name, port number as specified in the "java.naming.provider.url" property, referral, or URL supplied to the initial context
    3) java.naming.security.protocol
    4) java.naming.ldap.version
    5) java.naming.security.principal
    6) java.naming.security.credentials
    But when I run a test where user1, user2 and user3 login over and over again, I see (from tracing the conenctions) that 3 TCP connections are bing reused for user1, 2 and 3.
    Now this is good as it shows that pooled connections are being reused...BUT what I don't understand is why do I keep seeing new bind requests on each of these connections for the same user? for example, the TCP connection for user1 shows a series of BIND requests for user1.
    Now my question is this:
    IF each pool holds connections that have the same connection identity, and
    IF user principal and password are part of the simple "connection identity"
    THEN why do I see multiple BINDs? Shouldn't they not be needed anymore once the 1st BIND happens successfully?
    Looking forward to hearing from the experts :)
    Cheers!

    what DBMS and what JDBC driver are you using?

  • SG300 ssh strange error: "A client is already connected"

    Hi,
    I've  got a few SG300-52 switches running software version  1.3.0.62 which I configured for ssh management access with public key  authentication via:
    ip ssh server
    ip ssh pubkey-auth auto-login
    username mgmt password ... privilege 15
    crypto key pubkey-chain ssh
    user-key mgmt rsa
    key-string ...
    This is working fine if I connect interactively from my management system with:
    ssh -i mgmt_id_rsa mgmt@switch
    where mgmt_id_rsa is the name of a file containing the private key.
    I get a privileged command prompt as intended, without being asked for a password.
    However if I try to pass a command on the ssh command line like this:
    ssh -i mgmt_id_rsa mgmt@switch show version
    the command just hangs until I hit the Enter key a second time, and then emits the strange message:
    Received disconnect from 10.11.12.13: 2:
    A client is already connected
    (Exactly like that, including the line break after the "2:" and the blank before "A client".)The same happens if I pipe the command I want to send into ssh like this:
    echo show version | ssh -i mgmt_id_rsa mgmt@switch
    except the error message appears immediately and I don't have to hit Enter a second time.
    This is unfortunate as the objective of the whole exercise is to send commands to the switch from a script.
    Can anyone shed some light on why this is so? What is that strange message "a client is already connected" trying to tell me? Is that another bug in Cisco's ssh implementation? Ideas for a workaround, anyone?
    Thanks,
    Tilman
    PS: I already asked that question over in the "big business" support community before noticing there's a separate small business section, but got no answer there.
    PPS: The real objective of the exercise is to make scripted backups and updates of the switches' configurations, ie. what would be naturally expressed as
    scp -i mgmt_id_rsa mgmt@switch:running-config /var/backup/switch.config
    and
    scp -i mgmt_id_rsa /var/conf/switch.configchange mgmt@switch:running-config
    except it doesn't work that way because the SG300's ssh server lacks scp support. Trying to replace that by
    ssh -i mgmt_id_rsa mgmt@switch copy running-config scp://server/var/backup/switch.config
    and
    ssh -i mgmt_id_rsa mgmt@switch copy scp://server/var/conf/switch.configchange running-config
    led me straight to the problem above. Just in case someone feels inclined to ask the standard forum question: "Why do you want that anyway?" :-)

    Hi all,
    I've improved my expect script a bit to:
    allow specifying the SSH user and keyfile on the command line
    allow sending configuration mode commands
    correctly handle very long commands (line wrap) and commands producing no output
    Extended usage:
    ciscosb-exec confuser@myswitch -i ~/.ssh/confuser_id_rsa -c "ip ssh-client username memyself"
    ciscosb-exec confuser@myswitch -i ~/.ssh/confuser_id_rsa "copy scp://myserver/workdir/myswitch.configchange running-config"
    The "new and improved" script:
    #!/usr/bin/expect
    # Script to run an IOS command on a Cisco Small Business Switch via ssh
    # Prerequisites:
    # - Cisco Sx300 series switch with software version 1.3 or later
    # - public key authentication with auto-logon configured
    # Usage:
    #   ciscosb-exec [] [@]
    # Args:
    #         username on switch
    #         name or IP address of switch
    #      command string to execute
    # Options:
    #   -c          execute in configuration mode
    #   -i use SSH private key from
    #   -d          activate debugging output
    # Result:
    #   Switch response will appear on stdout
    # debug switches
    log_user 0
    exp_internal 0
    # configurable values
    set sshcmd "/usr/bin/ssh -c aes192-cbc"
    # end of configurable values
    # below matches prompts such as "switch#", "switch>", "switch$"
    set prompt "\[>#$\]\ *$"
    # getopt implementation snarfed from http://www2.tcl.tk/17342
    proc getopt {_argv name {_var ""} {default ""}} {
        upvar 1 $_argv argv $_var var
        set pos [lsearch -regexp $argv ^$name]
        if {$pos>=0} {
            set to $pos
            if {$_var ne ""} {
                set var [lindex $argv [incr to]]
            set argv [lreplace $argv $pos $to]
            return 1
        } else {
            if {[llength [info level 0]] == 5} {set var $default}
            return 0
    # parse command line
    set configmode [getopt argv -c]
    getopt argv -i idfile
    if {[getopt argv -d]} {
      log_user 1
      exp_internal 1
    if {[llength $argv] != 2} {
      send_user "Usage: ciscosb-exec \[\] \[@\] \"\"\n"
      send_user "Arguments:\n"
      send_user "        target username (default: current user)\n"
      send_user "          target host name or IP address\n"
      send_user "         command string to execute\n"
      send_user "Options:\n"
      send_user "    -c            execute in configuration mode\n"
      send_user "    -i    use SSH private key from \n"
      send_user "    -d            activate debugging output\n"
      exit 1
    set target [split [lindex $argv 0] @]
    if {[llength $target] == 1} {
      set device [lindex $target 0]
      set userid "$env(USER)"
    } elseif {[llength $target] == 2} {
      set userid [lindex $target 0]
      set device [lindex $target 1]
    } else {
      send_user "bad target: [lindex $argv 0]\n"
      exit 1
    set command [lindex $argv 1]
    if {[info exists idfile]} {
      set sshcmd "$sshcmd -i $idfile"
    eval "spawn $sshcmd -l $userid $device"
    match_max [expr 32 * 1024]
    # handle initial noise
    set timeout 20
    while { 1 } {
      expect {
        # command prompt
        -nocase -re "$prompt"     {break}
        # confirmations (unknown fingerprint etc.)
        -nocase -re "\\(yes/no\\)"  {send "yes\r"}
        # username prompt
        -nocase -re "name:|^login:" {send "$userid\r"}
        # password prompt
        -nocase -re "word:" {send_user "Public key authentication failed\n"; exit}
        # errors
        timeout     {send_user "Timeout waiting for command prompt\n"; exit}
        eof         {send_user "Connect failed: $expect_out(buffer)\n"; exit}
    # disable terminal formatting junk
    send "terminal datadump\r"
    expect {
        -nocase -re "$prompt"     {}
        timeout     {send_user "Timeout waiting for command prompt\n"; exit}
        eof         {send_user "Connection lost: $expect_out(buffer)\n"; exit}
    send "terminal width 0\r"
    expect {
        -nocase -re "$prompt"     {}
        timeout     {send_user "Timeout waiting for command prompt\n"; exit}
        eof         {send_user "Connection lost: $expect_out(buffer)\n"; exit}
    # switch to desired mode
    if {$configmode} {
      send "configure terminal\r"
      expect {
        -nocase -re "$prompt"     {}
        timeout     {send_user "Timeout waiting for command prompt\n"; exit}
        eof         {send_user "Connection lost: $expect_out(buffer)\n"; exit}
    # actual command may take a long time
    set timeout 180
    send "$command\r"
    expect {
        # skip command echo
        -re "$command\[\r\n\]*"   {exp_continue}
        # answer confirmation request
        -nocase -re " \\(Y/N\\).*\? *$" {
            # send confirmation, skip echo
            send "Y"
            expect -re "Y\[\r\n\]*"
            exp_continue
        # collect response, excluding next prompt
        -re "\r\n"                {send_user "$expect_out(buffer)"; exp_continue}
        -nocase -re "$prompt"     {send "exit\r"}
        timeout     {send_user "Timeout waiting for command prompt\n"; exit}
        eof         {send_user "Connection lost: $expect_out(buffer)\n"; exit}
    set timeout 20
    expect {
        # second exit needed for logging out from configuration mode
        -nocase -re "$prompt"     {send "exit\r"}
        timeout     {send_user "Timeout waiting for hangup\n"; exit}
        eof         {exit}
    expect {
        -nocase -re "$prompt"     {puts "Failed to log out, disconnecting"; exit}
        timeout                   {puts "Timeout waiting for hangup"; exit}
        eof                       {exit}
    HTH
    Tilman

  • Window 2000 & RMI client losing network connection

    We have a client/server java application communicating via RMI. The application runs perfect when the network is running smoothly. However, once the client loses connectivity with the network, the client runs in offline mode (as expected). However, once the client reestablishes a connection with the network, it is unable to communicate with the Server via RMI. It seems that Windows 2000 reassigns the client's IP address when it goes offline to localhost (127.0.0.1), when the client is reconnected the IP addresses is changed back to the network address, but it is unable to send data to the server running RMI. Any suggestions? We did not experience this problem with Windows NT.

    you need to specify the IP address of the server object from the JVM in which it is exported, using -Djava.rmi.server.hostname argument to the JVM (since the client and server run on one machine, you probably want to set this to 127.0.0.1, I think)

  • Unable to access LAN behind RV042 from QUICK VPN Client once it connects

    Hi,
    Very recently, we had implemented Site-to-Site VPN tunnel between two Linksys RV042 4-port VPN routers. Everybody in our remote site is accessing and sharing the data through this tunnel and it is working fine.
    Now, we have a plan to implement the same for our mobile clients also. For this, we had followed all the basic configuration procedures and user got connected to Quick VPN tunnel. Here is a problem we had observed. The mobile client user is connected to the tunnel, but unable to access the office LAN from the PC.
    What's the problem in configuration? What i have to do?
    Thanks
    VC Gundapaneni

    Hi There.
    have a look over here.
    http://www.linksysinfo.org/index.php?threads/netbios-issues-with-vpn.16170/

  • Clients unable to connect and get DHCP - LAP1142N AP and 5508 WLC

    Hi,
    I have 19 locations, each with 1 or more LAP1142N AP's in FlexConnect mode, AP's are primed using CAPWAP to my 5508 WLC at the datacenter. The AP's join the WLC without issue every time. I have two WLAN's, one guest and one staff, the guest network is open and obtains DHCP from a WatchGuard XTM33 firewall at each of the remote locations. The staff side is WPA2/RADIUS and DHCP is assigned from the WLC. Each AP is assigned a static IP that is not in the DHCP scope. For example: DHCP scope on the branch firewall is 192.168.1.10-250 the AP will be assigned static IP of 192.168.1.1.. The AP's are connected to a HP procurve switch that has a untagged VLAN, the firewall is using the native vlan 1 and so is the AP.
    I have been running this network for over a year and it has not had a single issue until the last two weeks. Nothing on the network has changed or has been upgraded.
    Now for the issue: The issue I am seeing is that clients are no longer able to connect to the AP and do not get DHCP assigned to them. I am able to get it working, if I remove the static IP from the AP, the AP will reboot, join the controller, then begin working, users can connect and DHCP is assigned from the firewall as it should. However, If the AP then reboots, the AP will join back to the controller but no clients can connect nor do they get a DHCP address. So, I then reassign a static IP to the AP again and it reboots, connects to the controller and clients then can connect and get DHCP.
    Attached is a running config from one of the APs
    I've found several posts on this topic, in fact the patch of unassigning or reassigning static IP is one that I found. However, I wanted to post this to see if there is any further assistance I can get on this. I am also waiting on my SmartNet to start up and will be contacting Cisco support as well.
    Thanks for any help.

    Alright, so I finally figured out the issue with this. I had a Mobility Anchor set on the guest WLAN and once I removed that all started working again.
    What is Mobility Anchor?
    A. Mobility Anchor, also referred to as Guest tunneling or Auto Anchor Mobility, is a feature where all the client traffic that belongs to a WLAN (Specially Guest WLAN) is tunneled to a predefined WLC or set of controllers that are configured as Anchor for that specific WLAN. This feature helps to restrict clients to a specific subnet and have more control over the user traffic. Refer to the Configuring Auto-Anchor Mobility section of Cisco Wireless LAN Controller Configuration Guide, Release 7.0 for more information on this feature.

  • Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site

    How to fix:
    Error occurred in deployment step 'Recycle IIS Application Pool': Cannot connect to the SharePoint site: Make sure that this is a valid URL and the SharePoint site is running on the local computer. If you moved this project to a new computer or if
    the URL of the SharePoint site has changed since you created the project, update the Site URL property of the project.

    Hi
    This is an issue with the permissions. Check this link
    http://www.spdoctor.net/Pages/message.aspx?name=Error-occurred-in-deployment-step-Recycle-IIS-Application-Pool
    http://stackoverflow.com/questions/7417046/vs2010-error-in-recycling-iis-application-pool-not-found
    Thanks
    Girish

  • Wireless Clients can't connect post WLC Upgrade to version 7.4.100.0

    Upgraded WLC Flex 7500 controller to: 7.4.100.0
    Previous WLC Controller version: 7.2.111.3
    After the upgrade, all AP's reported back to the controller and looked like working. We have 50+ branch sites that connect back via Layer 2 to the main office. The main office SSID's were broadcasting and users could connect and get the proper IP's. Users that connected back through FlexConnect AP's couldn't obtain an IP address. The client would authenticate to the WLC and accept the SSID key, but would not get an IP address. I see with the 7.4.100.0 upgrade there are more options for DHCP for each interface, which we don't use interfaces for all sites as we did in the early days, now we make sure the flex connect tab has the vlan identifier in the tab and the traffic goes out the local firewall etc. Each remote site has a Linux based firewall and DHCP server.
    Looking for any insight with the 7.4.100.0 upgrade that may cause clients to not connect and obtain an IP address.
    We have since back dated our WLC Software to: 7.2.111.3 to allow things to work pre upgrade which everything worked fine.
    Any suggestions would be great, we had to upgrade version 7.4.100.0 to support our AP 1602.
    Thanks in advance.
    Matt

    Verify that you have an upgraded FUS image. Second, make sure your WLAN to vlan mapping on the FlexConnect AP's have the correct vlan mapping. I have seen these change to the default vlan mapping.
    Sent from Cisco Technical Support iPhone App

  • Auto-Commit and Pooled JDBC Connections

    Forum Members,
    If I am using Oracle Pooled JDBC Connections in the OC4J container is auto-commit set to "true" by default?
    If I set auto-commit to "false" and then close the logical connection, when that connection is handed out again on a later call to getConnection(), is auto-commit automatically set back to "true"?
    Thanks,
    Richard

    Richard,
    Pardon me if I am stating the obvious, but you could test that in your code by invoking the getAutoCommit() method in interface java.sql.Connection.
    My experience (with OC4J stand-alone versions up to -- and including -- 10.1.2) is that the behaviour depends on which data source you have configured. For example, if you have defined an "ejb-location" attribute in your "data-sources.xml" file, and you use that as your JNDI lookup for your data source, then OC4J handles transactions and you shouldn't deal with "auto-commit" at all. See the following post for more details:
    Re: OC4J 10.1.3 Preview 4 - Global transaction active
    But if you have defined a "location" attribute and use that, then you do need to handle transactions explicitly.
    Hope this helps.
    Good Luck,
    Avi.

  • Which ports does Webi Rich CLient use to connect to Universe etc..

    Hello together,
    we have the problem that we cannot run Rich Client from computers outside our network - so which ports does webi Rich Client use to connect to BO Serverl?.
    It will always say universe not found. Login to rich client and everything else is possible.
    It's not an authorisations problem, inside the network people can run the programs fine.
    Thank you

    Hi,
    i assume you have enable CMS port on the firewall, apart from this you need to enable IFRS and Connection Server port also.
    Regards,
    Ramu.
    Edited by: Gowda Timma Ramu on Oct 14, 2010 4:06 PM

  • Obtaining an oracle.sql.STRUCT through a pooled JDBC connection

    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection defined in Weblogic. I need the vendor-specific object, rather than simply the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT. I can use reflection on this object to find and call the getVendorObj() method to obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is not a published API and is not guaranteed not to change in future versions.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct through a WebLogic connection pool in WebLogic Server 10?
    Thanks for any advice,
    -Dan Schwemlein

    dan schwemlein wrote:
    Joe,
    Thanks again. With your guidance, I have arrived at the following approach, which I'll post for the benefit of others, and which I'd be thankful if you would validate:
    1) Import the jar com.bea.core.datasource-1.0.0.0.jar from %BEA_HOME%\modules, which is the only location of the class WLConnection, which is the only class with the getVendorConnection() method you refer to.
    2) Get the logical connection from the pooled data source, cast it to a WLConnection, call getVendorConnection() to obtain an OracleConnection (from the ojdbc jar), and use this connection to obtain the required oracle.sql.STRUCT from an OracleResultSet.
    3) Be aware of the limitations and follow the guidelines in the document http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 regarding security, error handling, releasing resources (close only the logical connection), etc.
    Does this sound like the approach you had in mind?
    Thanks again,
    -Danyes.
    Joe
    >
    Re: Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
    Posted: Jul 16, 2007 3:21 PM
    dan schwemlein wrote:
    Thanks for the quick response!I was working today...
    Thank you for the information about the connection being closed.
    I will look into using this configuration setting.
    You say that you can describe a way to get a handle on an unwrapped
    pool object using some documented WLS-specific code. Are you referring
    here to the getVendorConnection() method?yes.
    This method does not help me
    get the oracle.sql.STRUCT object, because even the connection returned
    by getVendorConnection() returns a wrapped WL java.sql.Struct object
    from a call to getObject().I don't believe it. If you are running in WLS, with a local pool,
    the getVendorConnection() will give you the Oracle connection,
    which will give you an Oracle statement, etc, down to an oracle
    STRUCT object. Once you have a direct reference to the oracle connection,
    we're not in the picture when it returns something to you.
    It would be great if getVendorObj() were
    documented and could be counted on in future versions. To use this
    method, one would still have to access it via Java reflection, because
    the wrapper class and its getVendorObj() method would be exposed in an
    API, correct? Could this method be exposed in the API, so that reflection
    doesn't need to be used, or it is exposed somewhere that isn't documented?getVendorObj() is not yet exposed or therefore supported for the general
    wrapped object, so you would have to start from the connection and
    derive all subobjects from it.
    Thanks again,
    -Dan Schwemlein
    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a
    vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection
    defined in Weblogic. I need the vendor-specific object, rather than simply
    the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object
    which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT.
    I can use reflection on this object to find and call the getVendorObj() method to
    obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is
    not a published API and is not guaranteed not to change in future versions.Understood. We all benefit from sticking to the J2EE standards,
    but we could also wish Oracle had done so with it's driver objects.
    I will assume your code is running in the WebLogic server, because
    an external JVM can never access the real driver object, which will
    always really be in the WLS JVM. No active JDBC object is serializable.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct
    through a WebLogic connection pool in WebLogic Server 10?There is no way to get a handle on an unwrapped pool object without using some
    WLS-specific code, though I can describe a way with documented methods,
    and/or I can get our documentation altered to say we'll support the
    getVendorObj() method. We introspect every vendor object, and for those
    implementations that have done the wise thing, projecting any non-standard
    methods as an Interface, we are able to also project that Interface so
    the vndor example code should work. However, in some poorly-done
    cases, such as for some Oracle stuff, there is either no Interface,
    or the Oracle code has extensions that take java.sql objects as input,
    (at least that's the signature of the method) but two lines into the
    method, the Oracle code assumes and casts the java.sql object to a concrete
    Oracle object. In these use cases you need the direct unwrapped object.
    We provide and document Connection.getVendorConnection(), and intend
    getVendorObj() to serve the same for subobjects, but note the dangers
    and responsibilities: We rely on our wrappers to implement the security
    and thread-safety of our pooling system. Because user code can get
    unrestricted access to the actual connection from most JDBC objects,
    we can never trust that we have complete control once a vendor object
    is exposed. Therefore, by default we will close and replace every JDBC
    connection so exposed, as soon as the current thread is finished with
    the pool connection. This hurts performance. We also document a pool
    config setting that will tell us that you take responsibility for any such
    problems, and not to close connections just because they've been exposed.
    HTH,
    Joe
    Thanks for any advice,
    -Dan Schwemlein

Maybe you are looking for

  • Word merge 3 different documents ?

    I am trying to use the MS Office report block.vi to generate a report. Since the number of bookmarks is limited to 17, I thought I can create 3 documents using the VI with about 17 inputs each, and merge them programmatically. Is this possible ? I wa

  • Print Preview in Web UI giving errors

    Hi I have created a service contract quote in Web UI and have released the same. An action to create the print output has been created and attached to the transaction. A smartform has been developed to show the output as a PDF. This smartform is work

  • URGENT:Eventing between two iviews in one page

    Hi all, I have developed a model in visual composer which contains two iviews in a single page .The first iview contains the input fields and the data service.The second iview contains the output form.I should get the output in the second iview when

  • HT204053 I was using my husbands iCloud email. How do I change iCloud email to my iTunes email

    I was using my husbands email address and iCloud and want to change to my address. I've changed iTunes but can't change iCloud email. Any ideas on how to change it

  • How to make simple GUI application that use oracle 9i intermedia

    Mr Lawrence, i want to make a GUI application for storing and retrieving image data, can i build this application using delphi? i try using borland delphi 7, but delphi doesnt know object type ORDImage and ORDImageSignature. do u have any reference a