Help needed for Connection Pooling
I want to know about connection pooling in java.Can anyone suggest a best tutorial or link to learn this.
http://java.sun.com/developer/onlineTraining/Programming/JDCBook/conpool.html
http://java.sun.com/products/jndi/tutorial/ldap/connect/pool.html
or better Google it.
Similar Messages
-
Help to Configure Connection Pool For Jdeveloper
Hi ,
I am using Jdeveloper 10.1.2 and Oravle AS 10.1.2.
Language Used : J2EE,Struts and EJB
I am portletizing struts application.
I need help to configure Connection pool. By default it is taking a datasource.xml not the one i had defined. Pls help me out. Affecting the performance due to so many hit to db.
regards,
Jayashree JeganHi John,
Go through this thread of mine. You will get the required information to setup the connection pool.
SOAP adapter: WSDL issue
Also just check in Visual Studio Help .NET Connector for Connection Config class settings. You will see all the relevent parameters related with connection pool.
Regards. -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with re
Color management help needed for adobe CS5 and Epson printer 1400-Prints coming out too dark with reddish cast and loss of detail
System: Windows 7
Adobe CS5
Printer: Epson Stylus Photo 1400
Paper: Inkjet matte presentation paper with slight luster
Installed latest patch for Adobe CS5
Epson driver up to date
After reading solutions online and trying them for my settings for 2 days I am still unable to print what I am seeing on my screen in Adobe CS5. I calibrated my monitor, but am not sure once calibration is saved if I somehow use this setting in Photoshop’s color management.
The files I am printing are photographs of dogs with lots of detail I digitally painted with my Wacom tablet in Photoshop CS5 and then printed with Epson Stylus 1400 on inkjet paper 20lb with slight luster.
My Printed images lose a lot of the detail & come out way to dark with a reddish cast and loss of detail when I used these settings in the printing window:
Color Handling: Photoshop manages color, Color management -ICM, OFF no color adjustment.
When I change to these settings in printer window: Color Handling: Printer manages color. Color management- Color Controls, 1.8 Gamma and choose Epson Standard it prints lighter, but with reddish cast and very little detail and this is the best setting I have used so far.
Based on what I have read on line, I think the issue is mainly to do with what controls are set in the Photoshop Color Settings window and the Epson Printer preferences. I have screen images attached of these windows and would appreciate knowing what you recommend I enter for each choice.
Also I am confused as to what ICM color management system to use with this printer and CS5:
What is the best ICM to use with PS CS5 & the Epson 1400 printer? Should I use the same ICM for both?
Do I embed the ICM I choose into the new files I create?
Do I view all files in the CS5 workspace in this default ICM?
Do I set my monitor setting to the same ICM?
If new file opens in CS5 workspace and it has a different embedded profile than my workspace, do I convert it?
Do I set my printer, Monitor and PS CS5 color settings to the same ICM?
Is using the same ICM for all devices what is called a consistent workflow?
I appreciate any and all advice that can be sent my way on this complicated issue. Thank you in advance for your time and kind help.It may be possible to figure out by watching a Dr.Brown video on the subject of color printing. Adobe tv
I hope this may help............... -
File missing (file\BCD error code 0Xc0000034 help need for work!
file missing (file\BCD error code 0Xc0000034 help need for work! what can i do?
have an p 2000 notebook pcHi bobkunkle, welcome to the HP Forums. I understand you cannot boot passed the error you are receiving.
What is the model or product number of your notebook? What version of Windows is installed?
Guide to finding your product number
Which Windows operating system am I running?
TwoPointOh
I work on behalf of HP
Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
Click the “Kudos, Thumbs Up" on the bottom to say “Thanks” for helping! -
Using commons dbcp in SOA 8 for connection pool?
Hi there,
It is possible to use commons dbcp in SOA 8 for connection pool ing?
At far I tried SOA 8 does not work either Mckoi and AS400 databases jdbc drivers in a connection pool.
So having the experience with Tomcat and commons-dbcp with successfull connection pools, I am trying to use a alternative database connection pool, or use SOA8 connection pool using commons-dbcp and it with our AS400 db.
Do you think it is possible?
Thanks for your input!
Lorenzo JimenezI am really lost.
All I know i that I used this jtopen driver on tomcat with and without connection pool.
I used the same parameters, but SOA implementation or program is different. Maybe is the 1.4 api, maybe is the jdbc expected.
Really don't know.
What I know I as400 and mckoi drivers don't work where in Tomcat work ok.
Please check this thread with the error that SOA gave to me
http://forum.java.sun.com/thread.jsp?forum=136&thread=524472&tstart=0&trange=15
Thanks,
Lorenzo -
Help needed in Connecting to SAP From Eclipse
Hi All,
Currently, we have a requirement where we need to retrieve data from SAP System and need to upload the same in a Third Party Application (Java based system).
We are able to create an account in Java Application using Eclipse IDE by hard coding the Account details. We are stuck up in establishing the SAP connection and retrieving the details and then creating the extracted account details in Java application from Eclipse.
Any pointers on this will be of great help.
Regards,
EurekaHi Eureka,
Please refrain from creating cross-posts in parallel forums, moreover this question is JCo-related and is not directly connected with Java EE 5. The Help needed in Connecting to SAP From Eclipse in the Java Programming forum would be enough. Please continue the discussion there.
Regards,
Vladimir -
Help need for force to signout All session ! how...
hi
help need for force to signout All session ! how ??
Solved!
Go to Solution.Hi and welcome to the Skype Community,
To force a signout of all instances your Skype is signed into please change your password: https://support.skype.com/en/faq/FA95/how-do-i-change-my-password
Follow the latest Skype Community News
↓ Did my reply answer your question? Accept it as a solution to help others, Thanks. ↓ -
Need server.xml and web.xml for connection pooling
hi guys,
I am having lots of problem implementing the Connection Pool. I want to use the Tomcat's Connection pool classes and not my connection pool.
I have gone through lots of problem trying to configure it.
I got the range of errors. Has someone worked on this. Does it work with Tomcat 4.1 and Oracle 8i. Can anyone provide any links or previous posts to help me out.
If someone can paste their working server.xml and web.xml then that would be really grt.
Any kind of help would be really helpful.
AmitTomcat does not have a connection pooling mechanism. I've used Apache Commons DBCP with Tomcat although with PostgreSQL. It works great.
Nothing in my web.xml gets modified. Only server.xml needs to be updated for DBCP. The Tomcat JNDI Datasource documentation is very good and should get you through. -
I need help with socket connection pooling please
I need a basic connection pooling system for the code below users sets number connections 5 etc.
<main class>
s = new ListService(ssock.accept(),serverDir); //give list to client
Thread t = new Thread(s);
t.start();
<main class>
class ListService implements Runnable
Socket client;
String serverDir;
public ListService(Socket client,String serverDir)
this.client = client;
this.serverDir = serverDir;
public void run()
try
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
// send something to client
catch(Exception e)
System.out.println(e);
System.out.println("client disconnected\n");
catch(Exception e){}
Thank you so muchMy code already accepts multi clients I need pooling only 5 clients can be using the server at a time when one client disconnects that means another incoming client can enter the pool to use the server.
I tried to do a counter so when a connection is made it increments and then if counter>=numOfClients
set a variable to true or false and this is sent with the server setup so it determines if the server code is run or it just closes the connection but there is no way I can access the counter variable from within a runnable class thread when a client closes connection it should -1 from the variable
thanks -
Hi Guys, can you please help me with Connection Pooling.
I have:-
Tomcat 5.0.27
MySQL 4
Apache 2.0.
JSP web pages.
I have been trying to get connection pooling working but i havent been successful yet. Please do help me make it happen.
I have posted my server.xml and web.xml from /conf/. They are not edited. I have also included the pages that I am currently ussing to connect to the database.
I need you to assist me with how I should edit the above.
1. SERVER.XML
Where and how should I edit this file?
2. WEB.XML
Where and how should I edit this file?
3. DATABASE_INFO.JSP
<%
Class.forName("com.mysql.jdbc.Driver").newInstance();
%>
<%!
public java.sql.Connection dataconnect() throws SQLException {
Connection database_connector;
database_connector = DriverManager.getConnection("jdbc:mysql://localhost/publications?user=hello&password=hello");
return database_connector;
%>
<%!
public java.sql.Connection adminconnect(javax.servlet.http.HttpSession session) throws SQLException {
Connection database_connector;
if (session.getAttribute("s_conn")!=null) {
database_connector = (Connection) session.getAttribute("s_conn");
if (database_connector.isClosed()) {
database_connector = DriverManager.getConnection("jdbc:mysql://localhost/publications?user=hello&password=hello");
} else {
database_connector = DriverManager.getConnection("jdbc:mysql://localhost/publications?user=hello&password=hello");
session.setAttribute("s_conn", database_connector);
return database_connector;
%>
<%!
public String filedir() {
String directory = "C:/Tomcat/webapps/ROOT/publications/";
return directory;
%>
etc
Database Name : publicationsHi,
1- put your jdbc driver jar file in $CATALINA_HOME/common/lib (ex: C:\tomcat\common\lib )
2- Next, modify the web application deployment descriptor (/WEB-INF/web.xml) to declare the JNDI name under which you will look up preconfigured data source
take care of the ordering as below so resourc-ref tag is after taglib
<resource-ref>
<description>
Resource reference to a factory for java.sql.Connection
instances that may be used for talking to a particular
database that is configured in the server.xml file.
</description>
<res-ref-name>
jdbc/EmployeeDB
</res-ref-name>
<res-type>
javax.sql.DataSource
</res-type>
<res-auth>
Container
</res-auth>
</resource-ref>
3- add an element like this to the /META-INF/context.xml file in the web application. ( under ../webapps/mywebapplication/WEB-INF
<Context ...>
<Resource name="jdbc/EmployeeDB" auth="Container"
type="javax.sql.DataSource" username="hello" password="hello"
driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost/publications"
maxActive="8" maxIdle="4"/>
</Context>
4- code sample
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
DataSource ds = (DataSource)
envCtx.lookup("jdbc/EmployeeDB");
Connection conn = ds.getConnection();
... use this connection to access the database ...
conn.close();
The default data source support in Tomcat is based on the DBCP connection pool from the jakarta commons
Regards,
Alan Mehio
London,UK -
Help needed for javax.naming.Context and javax.naming.InitialContext
I need help on this two..
I am currently doing a project which required Connection Pooling. And this is the first time i'm exposed to all this.. I know nothing about these files.. But, i manage to get help from someone on DataSource. But i can't find any for naming.context and naming.InitialContext.. Can anyone help me? I need to know where i can get these 2 files or how to configure it.. Thanks! ;pThis'll help you:
http://java.sun.com/products/jndi/tutorial/ -
Help needed in connecting a Mac Mini to AT&T DSL
Any suggestions on how to troubleshoot this problem will be appreciated. I'm helping a friend connect a Mac to the Internet using AT&T DSL. The computer is a Mac Mini, 1.42 GHz PPC G4, running OS X 10.5. It is connected by Ethernet to an AT&T DSL modem. The Mini's Network preference is configured to connect using DHCP.
Strange symptoms include:
1. Safari will not connect to the Internet.
2. However, Firefox WILL connect and loads all websites I tried.
3. Apple Mail will connect and download messages from my friend's previous email address (not AT&T), but will not connect to allow me to configure his new AT&T account.
4. Other programs that need a network connection won't run; for example, the Software Update preference, when checking for new updates, claims that there is no network connection.
Do these symptoms indicate that the Mini's network preferences are not configured correctly, or that the DSL modem is not configured correctly?
More information: with the modem is an "Installation Wizard Disc" CD with a setup program. It's supposed to work for any PPC G3 or greater Mac, which certainly fits this Mini. BUT, when run on the Mini, the setup program displays a message that the computer's processor is "unrecognized". Then the setup program quits. I ran the setup program on my MacBook Pro laptop connected to the DSL modem. It went through a lengthy process with messages about "configuring the modem". After this, I was able to connect to the Internet with Safari using the laptop. This seems to indicated that there's nothing basically wrong with the modem or DSL connection. However, I can't run the setup program on the Mini. (The above symptoms were after getting the laptop to work, then switching the Ethernet connection back to the Mini.)This is a strange problem, especially since Firefox is working OK.
You might try using OpenDNS. They have a good set of instructions about how to do this here:
https://www.opendns.com/start
It's possible that AT&T's DNS servers aren't responding fast enough, and Safari is timing out quicker than Firefox.
The other option is to call AT&T and ask for support in accessing their DSL modem.
A third option would be to download a system maintenance utility like Yasu
http://jimmitchell.org/projects/yasu/
and use it to clear all the caches in the system -- in case the Mini somehow is using stale information about the net. -
Help needed to connect to remote PPTP VPN via PIX 515e
Hello,
A user in our office needs to connect to a client's remote PPTP VPN but can't connect. The user is running Windows 7. We have a Cisco PIX 515e firewall that is running PIX Version 6.3(3) - this is what our user is having to go through to try and make the connection to the client's remote VPN.
The client's network guys have come back and said the issue is at our side. They say that they can see some of our traffic but not all of it. The standard error is shown below, and they say it's symptomatic of the client-side firewall not allowing PPTP traffic:
"A connection between the VPN server and the VPN client XXX.XXX.XXX.XXX has been established, but the VPN connection cannot be completed. The most common cause for this is that a firewall or router between the VPN server and the VPN client is not configured to allow Generic Routing Encapsulation (GRE) packets (protocol 47). Verify that the firewalls and routers between your VPN server and the Internet allow GRE packets. Make sure the firewalls and routers on the user's network are also configured to allow GRE packets. If the problem persists, have the user contact the Internet service provider (ISP) to determine whether the ISP might be blocking GRE packets."
I have very little firewall experience and absolutely no Cisco experience I'm afraid. From looking at the PIX config I can see the following line:
fixup protocol pptp 1723.
Does this mean that the PPTP protcol is enabled on our firewall? Is this for both incoming and outgoing traffic?
I can see no reference to GRE 47 in the PIX config. Can anyone advise me what I should look for to see if this has been enabled or not?
I apologise again for my lack of knowledge. Any help or advice would be very gratefully received.
RosHi Eugene,
Thank you for taking the time to reply to me. Please see our full PIX config below. I've XX'd out names and IP addresses as I'm never comfortable posting those type of details in a public forum. I hope that the information below is still sufficient for you.
Thanks again for your help,
Ros
PIX(config)# en
Not enough arguments.
Usage: enable password [] [level ] [encrypted]
no enable password level
show enable
PIX(config)# show config
: Saved
: Written by enable_15 at 10:30:31.976 GMT/BDT Mon Apr 4 2011
PIX Version 6.3(3)
interface ethernet0 auto
interface ethernet1 auto
interface ethernet2 auto
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 DMZ security10
enable password XXX encrypted
passwd XXX encrypted
hostname PIX
domain-name XXX.com
clock timezone GMT/BST 0
clock summer-time GMT/BDT recurring last Sun Mar 1:00 last Sun Oct 2:00
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol pptp 1723
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name XX.XX.XX.XX Secondary
access-list outside_access_in permit tcp XX.XX.XX.XX 255.255.255.240 host XX.XX.XX.XX eq smtp
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq https
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq 993
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq 587
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq 82
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq www
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq www
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq www
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq https
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 993
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 587
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 82
access-list outside_access_in permit tcp host XX.XX.XX.XX host XX.XX.XX.XX eq 82
access-list outside_access_in permit tcp host XX.XX.XX.XX host XX.XX.XX.XX eq 82
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq smtp
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 8082
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq www
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq https
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 993
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 587
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq 82
access-list outside_access_in permit tcp any host XX.XX.XX.XX eq smtp
access-list outside_access_in permit tcp any host XX.XX.XX.XX. eq www
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.0.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl deny udp any any eq 135
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list inside_outbound_nat0_acl permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_40 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_60 permit ip any XX.XX.XX.XX 255.255.255.0
access-list USER1 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_10 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_20 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_30 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_50 permit ip any XX.XX.XX.XX 255.255.255.0
access-list outside_cryptomap_70 permit ip any XX.XX.XX.XX 255.255.0.0
access-list USER2 permit ip any XX.XX.XX.XX 255.255.255.0
access-list USER3 permit ip any XX.XX.XX.XX 255.255.255.0
access-list USER4 permit ip any XX.XX.XX.XX 255.255.0.0
pager lines 24
logging on
logging host inside XX.XX.XX.XX
icmp permit any outside
icmp permit any inside
mtu outside 1500
mtu inside 1500
mtu DMZ 1500
ip address outside XX.XX.XX.XX 255.255.255.248
ip address inside XX.XX.XX.XX 255.255.255.0
no ip address DMZ
ip audit info action alarm
ip audit attack action alarm
pdm location XX.XX.XX.XX 255.255.255.255 inside
pdm location XX.XX.XX.XX 255.255.0.0 outside
pdm location XX.XX.XX.XX 255.255.255.0 outside
pdm logging debugging 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list inside_outbound_nat0_acl
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside,outside) XX.XX.XX.XX XX.XX.XX.XX netmask 255.255.255.255 0 0
static (inside,outside) XX.XX.XX.XX. XX.XX.XX.XX netmask 255.255.255.255 0 0
static (inside,outside) XX.XX.XX.XX. XX.XX.XX.XX netmask 255.255.255.255 0 0
static (inside,outside) XX.XX.XX.XX XX.XX.XX.XX netmask 255.255.255.255 0 0
access-group outside_access_in in interface outside
route outside 0.0.0.0 0.0.0.0 XX.XX.XX.XX 1
route inside XX.XX.XX.XX 255.255.0.0 XX.XX.XX.XX 1
timeout xlate 3:00:00
timeout conn 2:00:00 half-closed 0:30:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server RADIUS protocol radius
aaa-server LOCAL protocol local
ntp authenticate
ntp server XX.XX.XX.XX source outside prefer
http server enable
http XX.XX.XX.XX 255.255.0.0 outside
http XX.XX.XX.XX 255.255.255.0 outside
http XX.XX.XX.XX 255.255.255.255 inside
snmp-server host inside XX.XX.XX.XX
no snmp-server location
no snmp-server contact
snmp-server community XXX
snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
crypto ipsec transform-set ESP-3DES-MD5 esp-3des esp-md5-hmac
crypto ipsec transform-set ESP-AES-128-SHA esp-aes esp-sha-hmac
crypto ipsec transform-set ESP-AES-128-MD5 esp-aes esp-md5-hmac
crypto ipsec transform-set ESP-3DES-SHA esp-3des esp-sha-hmac
crypto dynamic-map cola 20 set transform-set ESP-3DES-MD5
crypto dynamic-map dod 10 set transform-set ESP-3DES-MD5
crypto map outside_map 10 ipsec-isakmp dynamic cola
crypto map outside_map 20 ipsec-isakmp
crypto map outside_map 20 match address outside_cryptomap_20
crypto map outside_map 20 set peer XX.XX.XX.XX
crypto map outside_map 20 set transform-set ESP-3DES-MD5
crypto map outside_map 25 ipsec-isakmp
crypto map outside_map 25 match address USER1
crypto map outside_map 25 set peer XX.XX.XX.XX
crypto map outside_map 25 set transform-set ESP-3DES-MD5
crypto map outside_map 30 ipsec-isakmp
crypto map outside_map 30 match address outside_cryptomap_30
crypto map outside_map 30 set peer XX.XX.XX.XX
crypto map outside_map 30 set transform-set ESP-3DES-MD5
crypto map outside_map 40 ipsec-isakmp
crypto map outside_map 40 match address outside_cryptomap_40
crypto map outside_map 40 set peer XX.XX.XX.XX
crypto map outside_map 40 set transform-set ESP-3DES-MD5
crypto map outside_map 50 ipsec-isakmp
crypto map outside_map 50 match address outside_cryptomap_50
crypto map outside_map 50 set peer XX.XX.XX.XX
crypto map outside_map 50 set transform-set ESP-3DES-MD5
crypto map outside_map 60 ipsec-isakmp
crypto map outside_map 60 match address outside_cryptomap_60
crypto map outside_map 60 set peer XX.XX.XX.XX
crypto map outside_map 60 set transform-set ESP-3DES-MD5
crypto map outside_map 70 ipsec-isakmp
crypto map outside_map 70 match address outside_cryptomap_70
crypto map outside_map 70 set peer XX.XX.XX.XX
crypto map outside_map 70 set transform-set ESP-3DES-MD5
crypto map outside_map 75 ipsec-isakmp
crypto map outside_map 75 match address USER4
crypto map outside_map 75 set peer XX.XX.XX.XX
crypto map outside_map 75 set transform-set ESP-3DES-MD5
crypto map outside_map 80 ipsec-isakmp
crypto map outside_map 80 match address USER2
crypto map outside_map 80 set peer XX.XX.XX.XX
crypto map outside_map 80 set transform-set ESP-3DES-MD5
crypto map outside_map 90 ipsec-isakmp
crypto map outside_map 90 match address USER3
crypto map outside_map 90 set peer XX.XX.XX.XX
crypto map outside_map 90 set transform-set ESP-3DES-MD5
crypto map outside_map interface outside
isakmp enable outside
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address 0.0.0.0 netmask 0.0.0.0
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp key ******** address XX.XX.XX.XX netmask 255.255.255.255 no-xauth no-config-mode
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
telnet XX.XX.XX.XX 255.255.0.0 outside
telnet XX.XX.XX.XX 255.255.255.255 inside
telnet XX.XX.XX.XX 255.255.255.255 inside
telnet XX.XX.XX.XX 255.255.255.255 inside
telnet timeout 30
ssh XX.XX.XX.XX 255.255.255.248 outside
ssh XX.XX.XX.XX 255.255.255.248 outside
ssh timeout 30
management-access inside
console timeout 0
terminal width 80
Cryptochecksum:XXX
PIX(config)# -
Urgent help (on oracle connection pool)
Hi ,
I downloade oracle 8i thin drivers and i am using conenction pool in my application ...
I executed that servlet program
When i try to get conneciton using getDatabaseConnection() method in my jsp i am getting new connection each time ...............
In the oracel doc i read some thing like logical connections and physical connections .............
In my code i set maxLimit to 3 and i am getting connections more than 3 ( all are different).................
When i refresh the browser i am getting different connections like:
con======oracle.jdbc.driver.OracleConnection@338576
con======oracle.jdbc.driver.OracleConnection@1691dec
con======oracle.jdbc.driver.OracleConnection@63ceb4
con======oracle.jdbc.driver.OracleConnection@1590f50
con======oracle.jdbc.driver.OracleConnection@aeff82
con======oracle.jdbc.driver.OracleConnection@906e5b
con======oracle.jdbc.driver.OracleConnection@2403cf
con======oracle.jdbc.driver.OracleConnection@17ab157
See i set max limit as 3 and i got more than 3 connections and each diff ................
What is wrong in my code ............
Please help to me ..........
Here is the code :
import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.sql.*;
import oracle.jdbc.driver.*;
import oracle.jdbc.pool.*;
public class PoolJdbc4 extends HttpServlet{
private OracleConnectionPoolDataSource ocpds;
private OracleConnectionCacheImpl ods;
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
ocpds =new OracleConnectionPoolDataSource();
ocpds.setURL("jdbc:oracle:xxxxxxxxx");
// ocpds.setUser("xxx");
// ocpds.setPassword("xxx");
// Associate it with the Cache
ods = new OracleConnectionCacheImpl(ocpds);
// Set the Max Limit
ods.setMaxLimit (3);
// Set the Scheme
ods.setCacheScheme (OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEME);
catch (Exception e) {
throw new UnavailableException(this, "Couldn't create connection pool");
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
Connection con = null;
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
out.println("Updating salary");
try {
con = ods.getConnection("xxxxx","xxx");
System.out.println("con======="+con);
// Turn on transactions
con.setAutoCommit(false);
Statement stmt=con.createStatement();
ResultSet rs=stmt.executeQuery("select * from checkout_checkin");
while(rs.next())
out.println(rs.getString(1)+"<br>");
stmt.close();
rs.close();
con.close();
catch (Exception e) {
// Any error is grounds for rollback
try {
con.rollback();
catch (Exception ignored) { }
out.println("No more connections available, try later");
}ketan reddy - I'm pretty sure you are not getting a new connection each time even though you are seeing a different connection identifier printed each time you get a new connection.
If you have system privs, try looking at v$session while your servlet is running. I think you will see that you only have a single connection and it is being used each time.
For another test, try commenting out your conn.close() call so that you do not free up connections. Your servlet should fail after 3 executions cause it will not be able to get any more connections - because you specified
ods.setMaxLimit (3);
ods.setCacheScheme (OracleConnectionCacheImpl.FIXED_RETURN_NULL_SCHEME);
Good Luck
tim
Maybe you are looking for
-
Showing pdf in Fire fox giving problem
Hi every body , I have a problem related to PDF showing in the browser , It is working fine in the IE , but in the FF it is not showing . Here is my Backing bean code for fetching the PDF . The main backing bean name is myBean. public void showPDF(
-
Photshop Actions (Save As) between PC and Mac
I have a very large series of actions that do some pretty complicated moving of layers, switching visible layers and saving of these layers to separate jpgs. Over all, there is probably close to 300 separate actions that run at one go. I just migrate
-
I am considering creating a book made with iBooks Author but have a couple of unanswered questions. What determines how Apple chooses whether my book can make it into the ranks of being a paid book? In other words, I don't want to put a whole bunch o
-
Installing itunes then says network source is unavailable
i downloaded itunes before and all of a sudden it stopped working so i uninstalled it and now when im trying to re install it it says the feature im trying to use is on a network resource that is unavailable and tells me to find a folder containing i
-
my ipod is frozen tried to update but got ipod service error. itunes is not recognizing the ipod as being attached, but my pc makes a beep when i connect and disconnect so i know the cable and attachments are ok. cant reset, cant update, cant get itu