Closing pooled connections?? one at a time?

I've got an interesting need;
I've writen a custom UserManager for form based authentication.
class ValidateLoginManager extends AbstractUserManager
Authentication is to a legacy DB (Oracle) where all users have
been added as
Oracle users. So I've created a separate JNDI data source in
data-sources.xml
for pooling connections that I'll only use for authentication
(just a gut decission).
The container calls:
boolean checkPasswd (username, passwd) {
boolean authenticated = false;
try {
dbConnection = this.datasource.getConnection(username,
passwd);
authenticated = true;
} finally {
if (dbConnection != null)
dbConnection.close();
return authenticated;
This works great, since Oracle authenticates the connection
against it's user DB.
But the conn.close() does not close the session on the DB and
soon all MTS tasks are used up in idle sessions.
Any thoughts on forcing the connection to drop open sessions?
thanks, curt

Hi Curt,
For my custom usermanager I use a datasource specified in my data-sources.xml like this:
<data-source
     class="com.evermind.sql.DriverManagerDataSource"
     name="xyz"
     location="jdbc/OracleSecurityDS"
     xa-location="jdbc/xa/OracleXADS"
     ejb-location="jdbc/OracleDS"
     connection-driver="oracle.jdbc.driver.OracleDriver"
     url="jdbc:oracle:thin:@127.0.0.0:1521:xyz"
     inactivity-timeout="30"
/>
When you lookup the datasource using JNDI, make sure you use the name bound to the location specified in the "location" attribute and not the "ejb-location" attribute (as you usually do in your Ejbs).
I hope this helps.
- nik.
I've got an interesting need;
I've writen a custom UserManager for form based authentication.
class ValidateLoginManager extends AbstractUserManager
Authentication is to a legacy DB (Oracle) where all users have
been added as
Oracle users. So I've created a separate JNDI data source in
data-sources.xml
for pooling connections that I'll only use for authentication
(just a gut decission).
The container calls:
boolean checkPasswd (username, passwd) {
boolean authenticated = false;
try {
dbConnection = this.datasource.getConnection(username,
passwd);
authenticated = true;
} finally {
if (dbConnection != null)
dbConnection.close();
return authenticated;
This works great, since Oracle authenticates the connection
against it's user DB.
But the conn.close() does not close the session on the DB and
soon all MTS tasks are used up in idle sessions.
Any thoughts on forcing the connection to drop open sessions?
thanks, curt

Similar Messages

  • Clients behind shared wireless can only connect one at a time to RV042

    I am using a RV042 HW version 3 (black front panel and blue user interface).
    I have have 2 vpn users who share an apartment.
    They use a wireless router to get to the internet.
    Both use Windows 7 (firewall enabled) and the latest QuickVPN client.
    As it is, only one of the users can connect at the same time.
    When one is already connected the other gets a message "the remote gateway is not responding"
    Has anyone else experienced something like this ?
    Thanks in advance.
    These are the logs from the PC that connected ok:
    From wget_stop_error.txt
    --10:29:50--  https://Serena:*password*@180.243.235.82/StopConnection.htm?version=1?status=disable?IP=192.168.0.101?PASSWD=*password*?USER=Serena
               => `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//stopconn.conf'
    Connecting to 180.243.235.82:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
        0K                                                          96.68 KB/s
    10:29:50 (96.68 KB/s) - `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//stopconn.conf' saved [99]
    From wget_request_error.txt
    --10:29:45--  https://Serena:*password*@www.vantagebanking.com:60443/CheckIsakmp.htm?version=1?IP=192.168.0.101?PASSWD=*password*?USER=Serena*password*@www.vantagebanking.com:60443/CheckIsakmp.htm?version=1?IP=192.168.0.101?PASSWD=*password*?USER=Serena
               => `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//isakmp_status.conf'
    Resolving www.vantagebanking.com... 180.243.235.82
    Connecting to www.vantagebanking.com[180.243.235.82]:60443... connected.
    HTTP request sent, awaiting response...
    End of file while parsing headers.
    Giving up.
    From wget_error.txt
    --10:29:13--  https://Serena:*password*@180.243.235.82/StartConnection.htm?version=1?IP=192.168.0.101?PASSWD=*password*?USER=Serena
               => `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//vpnserver.conf'
    Connecting to 180.243.235.82:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
        0K                                                         176.76 KB/s
    10:29:14 (176.76 KB/s) - `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//vpnserver.conf' saved [181]
    From Log.txt
    2011/07/16 10:29:12 [STATUS]OS Version: Windows 7
    2011/07/16 10:29:12 [STATUS]Windows Firewall Domain Profile Settings: ON
    2011/07/16 10:29:12 [STATUS]Windows Firewall Private Profile Settings: ON
    2011/07/16 10:29:12 [STATUS]Windows Firewall Private Profile Settings: ON
    2011/07/16 10:29:12 [STATUS]One network interface detected with IP address 192.168.0.101
    2011/07/16 10:29:12 [STATUS]Connecting...
    2011/07/16 10:29:12 [DEBUG]Input VPN Server Address = www.vantagebanking.com
    2011/07/16 10:29:13 [STATUS]Connecting to remote gateway with IP address: 180.243.235.82
    2011/07/16 10:29:14 [STATUS]Remote gateway was reached by https ...
    2011/07/16 10:29:14 [STATUS]Provisioning...
    2011/07/16 10:29:24 [STATUS]Success to connect.
    2011/07/16 10:29:24 [STATUS]Tunnel is configured. Ping test is about to start.
    2011/07/16 10:29:24 [STATUS]Verifying Network...
    2011/07/16 10:29:30 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:29:33 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:29:36 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:29:39 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:29:42 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:29:45 [WARNING]Ping was blocked, which can be caused by an unexpected disconnect.
    2011/07/16 10:29:49 [STATUS]Disconnecting...
    2011/07/16 10:29:53 [WARNING]Failed to disconnect.
    And these are the ones from PC # 2 which failed to connect with error  "The remote gateway is not responding"
    This error just keeps looping around
    From wget_error.txt
    --10:29:21--  https://Paul:*password*@180.243.235.82/StartConnection.htm?version=1?IP=192.168.0.100?PASSWD=*password*?USER=Paul
               => `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//vpnserver.conf'
    Connecting to 180.243.235.82:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
        0K                                                         174.80 KB/s
    10:29:22 (174.80 KB/s) - `C://Program Files (x86)//Cisco Small Business//QuickVPN Client//vpnserver.conf' saved [179]
    From Log.txt
    2011/07/16 10:29:18 [STATUS]OS Version: Windows 7
    2011/07/16 10:29:18 [STATUS]Windows Firewall Domain Profile Settings: ON
    2011/07/16 10:29:18 [STATUS]Windows Firewall Private Profile Settings: ON
    2011/07/16 10:29:18 [STATUS]Windows Firewall Private Profile Settings: ON
    2011/07/16 10:29:18 [STATUS]One network interface detected with IP address 192.168.0.100
    2011/07/16 10:29:18 [STATUS]Connecting...
    2011/07/16 10:29:18 [DEBUG]Input VPN Server Address = www.vantagebanking.com
    2011/07/16 10:29:20 [STATUS]Connecting to remote gateway with IP address: 180.243.235.82
    2011/07/16 10:29:22 [STATUS]Remote gateway was reached by https ...
    2011/07/16 10:29:22 [STATUS]Provisioning...
    2011/07/16 10:29:32 [STATUS]Success to connect.
    2011/07/16 10:29:32 [STATUS]Tunnel is configured. Ping test is about to start.
    2011/07/16 10:29:32 [STATUS]Verifying Network...
    2011/07/16 10:29:38 [WARNING]Failed to ping remote VPN Router!
    2011/07/16 10:30:51 [WARNING]Failed to ping remote VPN Router!

    I just removed the tunnel and after that I cannot log in any more.
    I rebooted the router after removing the tunnel.
    I have tried many times.
    I use remote management from Singapore with the RV042 in Jakarta.
    Other users also cannot log in.
    "Verifying network" is as far as we get.
    This is the log:
    2011/07/19 14:54:06 [STATUS]OS Version: Windows XP
    2011/07/19 14:54:06 [STATUS]Windows Firewall is OFF
    2011/07/19 14:54:07 [STATUS]One network interface detected with IP address 10.71.11.9
    2011/07/19 14:54:07 [STATUS]Connecting...
    2011/07/19 14:54:07 [DEBUG]Input VPN Server Address = 180.243.235.82
    2011/07/19 14:54:07 [STATUS]Connecting to remote gateway with IP address: 180.243.235.82
    2011/07/19 14:54:09 [STATUS]Remote gateway was reached by https ...
    2011/07/19 14:54:09 [STATUS]Provisioning...
    2011/07/19 14:54:19 [STATUS]Success to connect.
    2011/07/19 14:54:19 [STATUS]Tunnel is configured. Ping test is about to start.
    2011/07/19 14:54:19 [STATUS]Verifying Network...
    2011/07/19 14:54:23 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:24 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:25 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:26 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:27 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:28 [WARNING]Ping was blocked, which can be caused by an unexpected disconnect.
    2011/07/19 14:54:37 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:38 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:39 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:40 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:42 [WARNING]Failed to ping remote VPN Router!
    2011/07/19 14:54:42 [WARNING]Ping was blocked, which can be caused by an unexpected disconnect.
    I have restored from the export .config file and all is back to normal.
    So I better leave the single tunnel as it is.
    I will try with spare RV042 when I am back in Jakarta

  • BI Publisher not closing connection pool connections?

    Hi:
    I'm using Oracle WLS 10.3.3, BIP 10.1.3.4.1.
    I have reports that were using JDBC data sources defined in BIP and I can run them all day with no problems. I created a JDBC connection pool in the WLS, created a JNDI name for it and then got BIP to recognize the JNDI data source. Finally, I modified the report data template to use the JNDI data source. It all works -- for a time. But after 20 or so executions I get an error that there are no more resources (connections). I went into the WLS and configured "inactive connection timeout" to 15 seconds or so. This eventually gives me another connection but doesn't prevent the lock-up.
    Why are the connections no being re-used? I am the only user, it should be using a connection, putting it back into the pool, and then re-using that still open connection for my next query. Is there another setting I need to set in WLS? Do I need to somehow tell the report to close the connection? I wouldn't think the transaction mode for the connection matters, but I could set that as well if I need to.
    Thanks.

    the reason, i asked you to upgrade the BIP patch
    DB CONNECTION IS NOT PROPERLY CLOSED,
    BI PUBLISHER NOT CLOSING DB CONNECTIONS USED FOR 'LIST OF VALUES' PARAMETERS
    there are few fixes related to Db connection in latest patch.
    you can get the latest 10.1.3.4.1 patch for just BIP alone, not OBIEE
    I would suggest you to log an SR and prove it to Support.
    their first suggestion wud be like mine ;)

  • WRT45G: can only connect one pc at the time to internet, cannot login to router setup

    Hello,
    I don't get this. The complete network worked fine for ... years? After a call with the ISP about a general/different issue, we can now only connect one pc at the time to internet. (We were asked to take out cables and we've put them back).
    I've been trying and searching for an answer for hours.
    problem:
    We can only connect through the router to internet with only one pc at the time (the first pc we connect after starting up the router).
    Also we cannot get into the setup menu of the router at 192.168.1.1
    We've been trying to reset the modem for 10, 30 seconds.
    Auto resolve IP/DNS. DHCP is enabled.
    I also remembered that I pushed the SES button, it turned from orange to flashing bluish. I never knew aboutthis function, nor it is mentioned in the manual I downloaded. Now this SES indicator is off.
    Also WLAN and DMZ led are off.
    I downloaded EasyLink_Connect.exe, went through the setup. It recognises there's internet connection, but stops and says: cisco does not support this modem.
    Temp. replacing this WRT45G modem with another one did not resolve the issue.
    I have no clue what went wrong, what we did wrong, and how we can resolve this issue? Please help! Thanks
    Message Edited by Brammm on 11-27-2008 03:13 PM

    Okay! 
    1.  (results when having assigned a static IP) :
     Windows IP-configuratie
             Primair DNS-achtervoegsel. . . . .:
            Knooppunttype: . . . . . . . . . .: onbekend     (unknown)
            IP-routering ingeschakeld. . . . .: nee      (no)
            WINS-proxy ingeschakeld . . . . . : nee    (no)
     Ethernet-adapter LAN-verbinding:
             Verbindingsspec. DNS-achtervoegsel:
            Beschrijving . . . . . . . . . . .:
              VIA Compatable Fast Ethernet Adapter
            Fysiek adres. . . . . . . . . . . : 00-16-17-CE-D5-40
            DHCP ingeschakeld:. . . . . . . . : nee    (no)
            IP-adres. . . . . . . . . . . . . : 192.168.1.20
            Subnetmasker. . . . . . . . . . . : 255.255.255.0
            Standaardgateway. . . . . . . . . : 192.168.1.1
            DNS-servers . . . . . . . . . . . : 192.168.1.1
     (results without having assigned a static IP: automatic config.) :  
     Ethernet-adapter LAN-verbinding: 
            Verbindingsspec. DNS-achtervoegsel:
            Beschrijving . . . . . . . . . . .:
              VIA Compatable Fast Ethernet Adapter
            Fysiek adres. . . . . . . . . . . : 00-16-17-CE-D5-40
            DHCP ingeshakeld. . . . . . . . . : ja     (yes)
            Autom. configuratie ingeschakeld. : ja       (yes)
            IP-adres. . . . . . . . . . . . . : 84.30.99.32       
    Subnetmasker. . . . . . . . . . . : 255.255.254.0       
    Standaardgateway. . . . . . . . . : 84.30.98.1       
    DHCP-server . . . . . . . . . . . : 213.51.144.90
            DNS-servers . . . . . . . . . . . : 212.54.40.25
                                                212.54.35.25
    2.  I do have another router, when I try that one, the problem we have remains. So that's a bit strange to me. That one is supposed to be working.
    Does this SES function configure anything other than the modem? So, does it alter PC configurations? I have no clue.   We even start to wonder whether the ISP is able to set up their internet in a way that unables us to make use of a router? That would be ridiculous
    Message Edited by Brammm on 11-30-2008 04:03 AM

  • Query about multiple connection pools under one database

    Hi,
    I have s query about connection pool, now we have a requirement,
    we have two schemas in one db, some data store in one schema, some in another schema,
    all tables are the same, but data is different, we want to retrive all data under two schemas,
    so we need two connection pools under one database,
    I have set two system DSN, and each connection pool was mapping to one DSN,
    but after I importing tables into RPD, when I view data, there is a dialog let me select connection pool. so If this, when we drag columns in answer, it will definitely get wrong.
    so how to realize this function about multiple connection pools under one database and we can get data normally.

    Hi,
    Try this step
    1)Better to create two different DSN for the same database with different user id and password
    2)now create multiple connection pool in the same database in u r RPD physical layer .
    also refer this link : for imporving performance
    http://obiee101.blogspot.com/2009/01/obiee-multiple-connection-pools.html
    http://gerardnico.com/wiki/dat/obiee/connection_pool
    Thanks
    Deva

  • Is it possibel to create one connection [pool for one report only

    Hi is it possibe to create one connection pool for one report only. Others report are running from the another connection pool under same DB.
    Thanks,

    Hi,
    Why do u want seperate connectionpool for that single report?
    I dont think its possible.Direct database request will be good solution for this.Try importing those columns which are used to build that report into physical layer and create new subject area.Not sure weather its right way to do.
    Regards,
    Srikanth

  • Processing JMS messages one at a time

    Hi, I'm on a project where we're trying to synch Siebel and EBS Customer information. However there are certain events that can trigger Customer data being sent twice simultaneously; this produces problematic racing conditions when the Customer data is new to the receiving system.
    We're trying to throttle that by sending the messages to a JMS queue and process them one at a time, ie, we only want one instance of the JMS queue listener activated at any one time (we don't expect continuous load; mainly small bursts). Unfortunately I'm not sure which properties have to be changed to do this. I have created a JMS listener that consumes message, pretty much created by the adapter wizard. Currently the listener is spawning new instances just as fast as the messages come in causing EBS AppAdapter errors (can't create new Customer as it already exists).
    Here's the JMS operation definition:
    <pc:inbound_binding />
    <operation name="Consume_Message">
    <jca:operation
    ActivationSpec="oracle.tip.adapter.jms.inbound.JmsConsumeActivationSpec"
    DestinationName="jms/CustomerInterface"
    UseMessageListener="false"
    PayloadType="TextMessage"
    OpaqueSchema="false" >
    </jca:operation>
    <input>
    <jca:header message="hdr:InboundHeader_msg" part="inboundHeader"/>
    </input>
    </operation>
    </binding>
    This is the activation agent:
    <activationAgents>
    <activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="ReceiveAccountJmsAdapter">
    <property name="portType">Consume_Message_ptt</property>
    </activationAgent>
    </activationAgents>
    This is the connector-factory:
         <connector-factory location="eis/CustomerInterface" connector-name="Jms Adapter">
              <config-property name="connectionFactoryLocation" value="jms/Queue/CustomerInterface"/>
              <config-property name="factoryProperties" value=""/>
              <config-property name="acknowledgeMode" value="AUTO_ACKNOWLEDGE"/>
              <config-property name="isTopic" value="false"/>
              <config-property name="isTransacted" value="false"/>
              <config-property name="username" value="oc4jadmin"/>
              <config-property name="password" value="********"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
    What else will I have to do to get this to work? Or will I be forced to deploy it to it's own BPEL domain where dspMaxThreads and dspMinThreads are set to 1?
    -- Just tried to put it on its own domain and change the dspMaxThreads/dspMinThreads and that didn't work.
    - Dale
    Message was edited by:
    Dale Earnest

    Hi Al,
    Yes - it possible.
    Please read the section Describing Message Ordering of the Adapter Life-Cycle Management of the Application Server Adapter Concepts Guide found here: http://download.oracle.com/docs/cd/B31017_01/integrate.1013/b31005/life_cycle.htm#BABJIFJI
    Best regards
    Christian Damsgaard

  • Closing DB Connection-Best Practice

    Currently I am opening and closing my connection to the database on each event that warrants a database connection. Is this the way I should handle it, or should I open the connection at the beginning and close it at the end, leaving it open in between?
    I have a certain panel that has numerous, separate inputs to a database that are isolated from each other, and if I happen to use all of these inputs, I open and close the connection 3 or 4 times.
    Thanks

    Hi,
    As far as an application is concerned we usually wont advice opening and closing connection as and when necessary. But if the connection is open for a long time there are some possible problems. One is that if the server goes down the user wont be aware of that till he executes the next query and also the error wont will be a valid one.Next is the amount of time ther server holds the connection and this has its significance if max. number of connections is specified.
    So again, its upto you to decide what all conditions are applicable to you. Its actually a trade-off between reliability and performance. :-)..
    regards Stallon

  • Java.io.notSerializableException:weblogic.jdbc.pool.Connection

    Hello,
              In my servelts only sometime I get this exception. I am using WLS7.0 jDK
              1.3.1(the one which comes with WLS7.0). I am using Java Beans which are all
              serializable.(I have declared that the classes implements Serilizable)
              Exception is as follows
              <Jan 27, 2003 4:19:09 AM EST> <Error> <HTTP Session> <triton>
              <AccupacServer> <ExecuteThread: '8' for queue: 'default'> <kernel identity>
              <> <100028> <Could not deserialize session data>
              java.io.NotSerializableException: weblogic.jdbc.pool.Connection
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
              at
              java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
              at
              java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
              at
              weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
              1)
              at
              weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
              6)
              at
              weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
              va:570)
              at
              weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
              va:552)
              at
              weblogic.servlet.internal.session.SessionData.remove(SessionData.java:734)
              at
              weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(Mem
              orySessionContext.java:51)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator$Invalida
              tionAction.run(SessionContext.java:523)
              at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
              r.java:744)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupE
              xpiredSessions(SessionContext.java:444)
              at
              weblogic.servlet.internal.session.SessionContext.deleteInvalidSessions(Sessi
              onContext.java:81)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              SessionContext.java:392)
              at
              weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:181
              at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
              r.java:744)
              at
              weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              er.java:167)
              at
              weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              :161)
              at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:38)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              Any help appreciated.
              Thanks
              Madhu
              

    Hello,
              In my servelts only sometime I get this exception. I am using WLS7.0 jDK
              1.3.1(the one which comes with WLS7.0). I am using Java Beans which are all
              serializable.(I have declared that the classes implements Serilizable)
              Exception is as follows
              <Jan 27, 2003 4:19:09 AM EST> <Error> <HTTP Session> <triton>
              <AccupacServer> <ExecuteThread: '8' for queue: 'default'> <kernel identity>
              <> <100028> <Could not deserialize session data>
              java.io.NotSerializableException: weblogic.jdbc.pool.Connection
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1143)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
              at
              java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:1822)
              at
              java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:475)
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1209)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:361)
              at
              weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:9
              1)
              at
              weblogic.servlet.internal.AttributeWrapper.getObject(AttributeWrapper.java:6
              6)
              at
              weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
              va:570)
              at
              weblogic.servlet.internal.session.SessionData.removeAttribute(SessionData.ja
              va:552)
              at
              weblogic.servlet.internal.session.SessionData.remove(SessionData.java:734)
              at
              weblogic.servlet.internal.session.MemorySessionContext.invalidateSession(Mem
              orySessionContext.java:51)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator$Invalida
              tionAction.run(SessionContext.java:523)
              at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
              r.java:744)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.cleanupE
              xpiredSessions(SessionContext.java:444)
              at
              weblogic.servlet.internal.session.SessionContext.deleteInvalidSessions(Sessi
              onContext.java:81)
              at
              weblogic.servlet.internal.session.SessionContext$SessionInvalidator.trigger(
              SessionContext.java:392)
              at
              weblogic.time.common.internal.ScheduledTrigger.run(ScheduledTrigger.java:181
              at
              weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
              r.java:744)
              at
              weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
              er.java:167)
              at
              weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
              :161)
              at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:38)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
              Any help appreciated.
              Thanks
              Madhu
              

  • Why do I need to reflesh one, to two times just to view a webpage properly?

    Every time I visit a page, I have to refresh one, to two times before the page is able to be viewed properly. This happens on other computers, and other internet connections. How can I make it so the webpage is exactly as it should be the first time around? When I go to a page, I get the "basic" text version. Once I refresh, all the formatting, videos, and pictures will be up.

    import java.awt.;
    import javax.swing.;
    import java.awt.datatransfer.*;
    import java.io.FileReader;
    import java.io.IOException;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseEvent;
    public class Main extends JPanel implements MouseListener {
    public Main() {
    super(new GridLayout(2,2));
    final JTextArea jt= new JTextArea("dear test :) ",5,20);
    FileReader reader = null;
    System.err.println("Error closing reader");
    exception.printStackTrace();
    JButton bu = new JButton("copiar");
    final Clipboard clipboard = getToolkit().getSystemClipboard();
    //new add
    add(nn);
    add(tt);
    bu.addMouseListener(new MouseListener() {
    public void mouseEntered(MouseEvent e) {
    StringSelection data = new StringSelection(jt.getText());
    clipboard.setContents(data, data);
    public void mouseClicked(MouseEvent e) { }
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) {}
    public void mouseExited(MouseEvent e) { }
    private static void createAndShowGUI() {
    //Create and set up the window.
    JFrame frame = new JFrame("TextDemo");
    public static void main(String[] args) {
    //Schedule a job for the event dispatch thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    createAndShowGUI();
    public void mouseClicked(MouseEvent e) { }
    public void mousePressed(MouseEvent e) { }
    public void mouseReleased(MouseEvent e) { }
    public void mouseEntered(MouseEvent e) { }
    public void mouseExited(MouseEvent e) { }
    } the problem is this line bu.addMouseListener(new MouseListener() {
    if i change this to bu.addMouseListener(this() {
    it gives error saying expected ')'
    and then doesn't compile.
    i just don't know why , although the program runs when i declare the methods two times,
    but i think it's better java code , if i learn it why is this error and correct it

  • The underlying connection was closed: A connection that was expected to be kept alive was closed by the server

    Dear forum 
    Please help
    I'm running an application that receive some messages (mail)
    I'm running under server 2012.
    For some reason the messages are stop to being received due to the session that is being closed.
    i can read the log saying:
    HTTPS ReceiveProcess(): Null segement received
    Closing session, dispatch Timer: 60000 ms.
    The underlying connection was closed: A connection that was expected to be kept alive was closed by the
    server
    Changing session Thread Time from 60 000ms to 2000ms.
    BatapWebService socket closed.
    Can anyone tell me how to fix that it's very annoyin that is closing the connexion and my messages are not
    being received.
    I need to restart the server each time to be able to receive all messages.
    is that a parameter i have to change?
    please help

    What exactly is the application?
    What is giving you the error? Is there a specific Event ID number and Source name?
    I haven't seen a segmentation error in quite some time. The last time I saw one it was due to an app trying to do something on the OS side that the OS didn't like. I believe DEP protected it, but it was long ago and I don't fully remember the details. It
    was a custom written app and the programmers corrected it.
    I'm not a dev, so I can't help with the app itself.
    Here's more on segmentation errors:
    http://en.wikipedia.org/wiki/Segmentation_fault
    If you need assistance with the app itself, I would suggest to post it to MSDN:
    http://social.msdn.microsoft.com/forums/en-US/categories/
    If it's an app written by another language, you can try this:
    Test your web browser for WebSocket support
    http://jimbergman.net/websocket-web-browser-test/
    Ace Fekay
    MVP, MCT, MCSE 2012, MCITP EA & MCTS Windows 2008/R2, Exchange 2013, 2010 EA & 2007, MCSE & MCSA 2003/2000, MCSA Messaging 2003
    Microsoft Certified Trainer
    Microsoft MVP - Directory Services
    Complete List of Technical Blogs: http://www.delawarecountycomputerconsulting.com/technicalblogs.php
    This posting is provided AS-IS with no warranties or guarantees and confers no rights.

  • Socket connection dies after some time being idle w/o firing event

    Hi,
    I use this code to connecto my server from my Client
              if (socket == null){
                   try{
                        if (pwd.length > 0)
                             System.out.println("opening connection...to "+host+" at port "+port);
                             socket = new Socket(host, port);          
                             toServer = new ObjectOutputStream(socket.getOutputStream());
                             fromServer = new ObjectInputStream(socket.getInputStream());
                             System.out.println("Connection established!");
                             fireClientEvent(new ClientEvent(this, ClientEvent.CONNECTION_ESTABLISHED, ""));
                             this.connected = true;
                             Hashtable<String, String> table = new Hashtable<String, String>();
                             table.put("action", "login");
                             table.put("key", convertToString(pwd));
                             sendObject(table);
                   }catch(IOException e){
                        try{
                             if (socket != null)
                                  socket.close();
                             System.out.println("Error while connecting... Server does not exist!");
                             this.connected = false;                         
                             fireClientEvent(new ClientEvent(this, ClientEvent.SERVER_DOES_NOT_EXIST, getHost()+":"+getPort()));
                        }catch(IOException x){
                             System.out.println("I/O ERROR @ CLIENT CONNECT!");
                             removeAllListeners();
                             x.printStackTrace();
              }And this is how my server responds to client requests:
         public void run()
              ServerSocket server = null;
              Socket socket           = null;
              Hashtable<String, String> ClientInfo = new Hashtable<String, String>(); 
              try{
                   server = new ServerSocket(getPort());
                   //listen for connections
                   while (!stopServer)
                        try{
                             System.out.println("Starting Server at port: "+getPort());
                             socket = server.accept();
                             ClientInfo.put("remoteip", socket.getInetAddress().toString());
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_REQUESTED, null));
                             ThreadedSocket tsocket = getThreadedSocket(socket);
                             tsocket.addSocketListener(this);
                             tsocket.setMaxSolvingTime(maxSolvingTime);
                             Sockets.add(tsocket);
                             executor.execute(tsocket);
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_ESTABLISHED, null));
                        }catch (IOException ioe){
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.UNEXPECTED_CONNECTION_ERROR, null));
                             exceptionThrown(ioe);
              }catch(Exception x){
                   exceptionThrown(x);
              }finally{
                   try{
                        server.close();
                        socket.close();
                   }catch (Exception e){
                        exceptionThrown(e);
         }It seems that after some time (aprox. 10-15 minutes) being idle, my client gets disconnected withougt firing any event so the Server thinks the client is still connected but it does not get any messages because the client has closed the connection (I think)
    Am I doing/thinking something wrong?

    Thanks It seems that I am doing something completely wrong.
    I created this object:
    package main;
    import java.util.Hashtable;
    import java.util.Vector;
    public class SocketPinger implements Runnable {
        private Vector<ThreadedSocket> sockets = null;
        Hashtable<String, Object> action = new Hashtable<String, Object>();
        public SocketPinger()
            action.put("action", "scheduled_ping");
        public SocketPinger(Vector<ThreadedSocket> socks)
            this.sockets = socks;
            action.put("action", "scheduled_ping");
        public void run()
             process();
        public void process()
             if (sockets != null)
                  for (ThreadedSocket socket : this.sockets)
                       try
                            socket.sendObject(action);
                       }catch(Exception e){
                            sockets.remove(socket);
        public void setSockets(Vector<ThreadedSocket> socks)
             this.sockets = socks;
    }which I call with this command:
         public class ThreadScheduler
             private SocketPinger pinger;
             private final ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();
             public void activate()
                 pinger = new SocketPinger(Sockets);
                 scheduler.scheduleWithFixedDelay (pinger, 5, 10, TimeUnit.SECONDS);            
             public void deactivate() {
                 scheduler.shutdown();
         }This makes the Scheduler object wake up every 10 secs and ping all the clients. This works and since then everything seemed to work fine. Today I noticed that when I shut down the client abnormaly (System.exit(0);) the server doesn't understand it. The sendObject() method works fine.
    This is my ThreadedSocket with the sendObject() method:
    public class ThreadedSocket extends Thread
         protected Socket socket;     
         protected ObjectOutputStream toClient;
         protected ObjectInputStream fromClient;
         protected ConnectionPool Pool;
         protected DBManager db;
         public ThreadedSocket(Socket sock, int priority, ConnectionPool pool) throws IOException
              socket = sock;
              this.Pool = pool;
              toClient = new ObjectOutputStream(socket.getOutputStream());
              fromClient = new ObjectInputStream(socket.getInputStream());                    
              setPriority(priority);     
              db = new DBManager(Pool);
         public void sendMessage(String message)
              try{
                   toClient.writeUnshared(message);
                   toClient.flush();
              }catch(Exception e){
         public void sendObject(Hashtable<String, Object> table)
              try{               
                   toClient.writeUnshared(table);
                   toClient.flush();
                   toClient.reset();
              }catch(Exception e){
         }and this is how I initialize the ThreadedSocket on my Server object
         public void run()
              ServerSocket server = null;
              Socket socket           = null;
              Hashtable<String, String> ClientInfo = new Hashtable<String, String>(); 
              try{
                   server = new ServerSocket(getPort());
                   //listen for connections
                   while (!stopServer)
                        try{
                             System.out.println("Starting Server at port: "+getPort());
                             socket = server.accept();
                             ClientInfo.put("remoteip", socket.getInetAddress().toString());
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_REQUESTED, null));
                             ThreadedSocket tsocket = getThreadedSocket(socket);
                             tsocket.addSocketListener(this);
                             tsocket.setMaxSolvingTime(maxSolvingTime);
                             Sockets.add(tsocket);
                             executor.execute(tsocket);
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.CONNECTION_ESTABLISHED, null));
                        }catch (IOException ioe){
                             fireServerEvent(new ServerEvent(ClientInfo, ServerEvent.UNEXPECTED_CONNECTION_ERROR, null));
                             exceptionThrown(ioe);
              }catch(Exception x){
                   exceptionThrown(x);
              }finally{
                   try{
                        server.close();
                        socket.close();
                        if (scheduler != null)
                             scheduler.deactivate();
                   }catch (Exception e){
                        exceptionThrown(e);
              So I have to make this question unanswered, because it is actually partially answered. Although the server can wake up and ping the clients, I still find it difficult to see if the client really exists after some abnormal termination (i.e. computer dies, or sth similar).

  • Closing socket connection from 2nd thread

    I did some research on different operating systems to find a unique solution how to timeout a blocking recv call in one thread.
    Closing the connection from another thread helps but I found that there are two different methods how to close the connection:
    - either just calling close with the correct linger options
    - call shutdown first and then close
    Unfortunately most platforms work fine with only one of these methods and fail more or less severe with the other method.
    While I think to fully understand the behavior of Windows and Linux, Solaris is still a big question mark for me.
    I have some machines (running Solaris 8, 7 and 2.6) which work well with just closing and crash the system when using shutdown (while having bad luck in the timing of the other peer). And I have another 2.6 machine that behaves the other way around.
    I created a detailed description about the whole problem and my findings in a PDF if you are interested: http://www.webwasher.com/download/notes/timeoutblockingsocketcall.pdf
    Is anybody able to explain how the Solaris implementation works here?
    And does anybody know why I see the differences with the two 2.6 boxes? (I changed patch level and exchanged clib without success.
    Martin

    I have a main program which creates a thread.Why not create a thread once the object has been read.
    The thread would take some time to process this
    object before it accepts another object to be passed
    in from the main program.Threads are used for concurrent execution. If you don't want concurrent execution, don't use additional threads. Have the main program do the reading and execution and then it cannot read another object until it has finished executing the previous one.
    >
    However, I realise that my main program:
    s = new Socket("localhost", 2001);
    will produce a socket connection
    socket connection even if the thread is still
    processing the object. Why is this possible?This is what threads do. It is call multi-threading.
    Initially I thought the thread would lock the socketIt will lock the sockect when you lock it with synchronized. Howver you are creating a new socket each time so even this would not do what you suggest.
    and my main program would not be able to get a socket
    connection until my thread releases the socket.Everytime you call new Socket() it creates a NEW socket. You can open as many socket as the server can handle. (10000+)
    Code in my thread to accept a socket connection:
    server = new ServerSocket(2001);
    ois = new ObjectInputStream(server.accept().getInputStream());I would suggest putting the Socket created by server.accept() into a variable. Otherwise you will not be able to reply to the request, nor will you be able to close() the connection.
    How can I workaround this issue. Hope somebody can help. Thanks.You don't need a workaround, you need to fix the logic of your application.

  • Executing commands when connection pool connections created

    Is there any way to set up connection pools to automatically execute a
    command when a connection is created?
    The system I'm working on needs (for a number of reasons outside of our
    control) to switch our connection to be rule based by executing:
    alter session set optimizer_goal=RULE;
    I guess we could add this functionality into our "getConnection" method but
    this just seems kind of inefficient.
    We're using WLS5.1sp11 on solaris2.6 talking to oracle 8.1.7 using
    weblogic.jdbc20.oci.Driver.
    Does anyone have any ideas on how to persuade JDriver to initialise the
    pool with the command above?
    Thanks
    Barry

    Barry Munro wrote:
    Is there any way to set up connection pools to automatically execute a
    command when a connection is created?no, but...
    The system I'm working on needs (for a number of reasons outside of our
    control) to switch our connection to be rule based by executing:
    alter session set optimizer_goal=RULE;
    I guess we could add this functionality into our "getConnection" method but
    this just seems kind of inefficient.
    We're using WLS5.1sp11 on solaris2.6 talking to oracle 8.1.7 using
    weblogic.jdbc20.oci.Driver.
    Does anyone have any ideas on how to persuade JDriver to initialise the
    pool with the command above?One trick you can do is to define the pool's connection test to do this
    every time you reserve a pool connection, instead of doing a query to DUAL or
    whatever test table you define. Define the testTable to be:
    testTable=SQL alter session set optimizer_goal=RULE,\
    testConnsOnReserve=true,\
    Joe
    Thanks
    Barry

  • Closing DBLINK connection

    Java threads acquire a connection from a pool and execute transactions and give up the connection back to the pool when the transaction id finished. The pool maintains open connections to an oracle database DB1(say) which REMAIN OPEN after they are used. Some transactions cause a SELECT to use a DBLINK to another oracle database DB2(say) which causes a connection to be opened to DB2 from DB1 . Beacuse the pool connections are maintained in an open state to DB1 the connections from DB1 to DB2 are also left open and therefore accumulate.
    The owners of DB2 are complaining about the number of open connections from DB1 to DB2 that are left open.
    How would I alleviate this? Should I cause the DBLINK connection (from DB1 to DB2) to close every time the transaction completes? If so how would I achieve that?
    Should I enforce a timeout on the DBLINK connection (DB1 to DB2) connection?
    Please help.

    user4900730 wrote:
    Some transactions cause a SELECT to use a DBLINK to another oracle database DB2(say) which causes a connection to be opened to DB2 from DB1 .How is that achieved? Are those individual SELECT statements issued directly by JAVA thread or part of procedures/functions being called by JAVA Thread or combination of both?
    You can either
    a) change JAVA code to ensure that dblink is closed OR
    b) If the "connection pool" is maintained by some application server, see if you can configure/modify it to close database links when JAVA threads return the connection.

Maybe you are looking for

  • About WWDC video style recording and make dvd

    How I can do same way as presentation and speaker in camera on same screen? I believe there is software and hardware make that work.  I use Sony HD camera, Powerpoint or keynote. I would like do WWDC style to record for my client's seminar because lo

  • IDOCs  are queued up In Integration Server

    Folks , I am not able to process the iDOCS as they are choked up in Integration server with following trace , can anybody help me out <i><b>  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - <!--  Receiver Grouping   --> - <SOAP:Envelope xm

  • How to secure BSP applications for external users on the internet?

    I posted this question under Enterprise Portal forum but got no response. I am hoping some of you experts in this area can help. We have developed BSP applications and set them up as iViews in Enterprise Portal 6. Our portal implementation will be us

  • IPod won't stay in disk mode

    I have the dreaded sad face icon. I am attempting to restore it. I am able to put the iPod into disk mode. It will stay in disk mode and charge with the A/C charger. When I try to connect it to the pc it will flash "do not disconnect" for a few secon

  • TS2755 I updated to the new iOS and I have delayed typing. How do I fix that?

    Please help me it's really annoying. I'll type one thing but it doesn't show for a minute. This started when I downloaded the new iOS 7.02