Java Doc for ArcSDEConnectionPool.java in  » GIS » GeoTools-2.4.1 » org » geotools » arcsde » pool » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoTools 2.4.1 » org.geotools.arcsde.pool 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.geotools.arcsde.pool.ArcSDEConnectionPool

ArcSDEConnectionPool
public class ArcSDEConnectionPool (Code)
Maintains SeConnection's for a single set of connection properties (for instance: by server, port, user and password) in a pooled way

Since sde connections are not jdbc connections, I can't use Sean's excellent connection pool. So I'll borrow most of it.

This connection pool is configurable in the sense that some parameters can be passed to establish the pooling policy. To pass parameters to the connection pool, you should set some properties in the parameters Map passed to SdeDataStoreFactory.createDataStore, wich will invoke SdeConnectionPoolFactory to get the SDE instance's pool singleton. That instance singleton will be created with the preferences passed the first time createDataStore is called for a given SDE instance/user, if subsecuent calls change that preferences, they will be ignored.

The expected optional parameters that you can set up in the argument Map for createDataStore are:

  • pool.minConnections Integer, tells the minimun number of open connections the pool will maintain opened
  • pool.maxConnections Integer, tells the maximun number of open connections the pool will create and maintain opened
  • pool.timeOut Integer, tells how many milliseconds a calling thread is guaranteed to wait before getConnection() throws an UnavailableArcSDEConnectionException


author:
   Gabriel Roldan, Axios Engineering
version:
   $Id: ArcSDEConnectionPool.java 27863 2007-11-12 20:34:34Z desruisseaux $

Inner Class :class SeConnectionFactory extends BasePoolableObjectFactory

Field Summary
final public static  intDEFAULT_CONNECTIONS
    
final public static  intDEFAULT_MAX_CONNECTIONS
    
final public static  intDEFAULT_MAX_WAIT_TIME
    
final protected static  LevelINFO_LOG_LEVEL
    
final protected static  LoggerLOGGER
    

Constructor Summary
protected  ArcSDEConnectionPool(ArcSDEConnectionConfig config)
    

Method Summary
public  voidclose()
    
public  voidfinalize()
     Ensures proper closure of connection pool at this object's finalization stage.
public synchronized  intgetAvailableCount()
    
public  ListgetAvailableLayerNames()
    
public  ArcSDEConnectionConfiggetConfig()
    
public  ArcSDEPooledConnectiongetConnection()
    
public synchronized  intgetInUseCount()
    
public  intgetPoolSize()
     returns the number of actual connections holded by this connection pool.
public  SeLayergetSdeLayer(String typeName)
    
public synchronized  SeLayergetSdeLayer(SeConnection conn, String typeName)
    
public  SeTablegetSdeTable(String tableName)
    
public  SeTablegetSdeTable(SeConnection conn, String tableName)
    
public synchronized  voidmarkConnectionAsFailed(ArcSDEPooledConnection conn)
     Sometimes (and largely without reason) ArcSDEPooledConnections (really their underlying SeConnection objects) just poop out.
public  StringtoString()
    

Field Detail
DEFAULT_CONNECTIONS
final public static int DEFAULT_CONNECTIONS(Code)
default number of connections a pool creates at first population



DEFAULT_MAX_CONNECTIONS
final public static int DEFAULT_MAX_CONNECTIONS(Code)
default number of maximun allowable connections a pool can hold



DEFAULT_MAX_WAIT_TIME
final public static int DEFAULT_MAX_WAIT_TIME(Code)



INFO_LOG_LEVEL
final protected static Level INFO_LOG_LEVEL(Code)
DOCUMENT ME!



LOGGER
final protected static Logger LOGGER(Code)
package's logger




Constructor Detail
ArcSDEConnectionPool
protected ArcSDEConnectionPool(ArcSDEConnectionConfig config) throws DataSourceException(Code)
Creates a new SdeConnectionPool object with the connection parameters holded by config
Parameters:
  config - holds connection options such as server, user and password, aswell as tuning options as maximun number of connectionsallowed
throws:
  DataSourceException - DOCUMENT ME!
throws:
  NullPointerException - DOCUMENT ME!




Method Detail
close
public void close()(Code)
closes all connections in this pool



finalize
public void finalize()(Code)
Ensures proper closure of connection pool at this object's finalization stage.



getAvailableCount
public synchronized int getAvailableCount()(Code)
TODO: Document this method! DOCUMENT ME!



getAvailableLayerNames
public List getAvailableLayerNames() throws DataSourceException(Code)
Gets the list of available layer names on the database a List<String> with the registeredfeatureclasses on the ArcSDE database
throws:
  DataSourceException -



getConfig
public ArcSDEConnectionConfig getConfig()(Code)
DOCUMENT ME! DOCUMENT ME!



getConnection
public ArcSDEPooledConnection getConnection() throws DataSourceException, UnavailableArcSDEConnectionException(Code)
DOCUMENT ME! DOCUMENT ME!
throws:
  DataSourceException - DOCUMENT ME!
throws:
  UnavailableArcSDEConnectionException -
throws:
  IllegalStateException - DOCUMENT ME!



getInUseCount
public synchronized int getInUseCount()(Code)
TODO: Document this method! DOCUMENT ME!



getPoolSize
public int getPoolSize()(Code)
returns the number of actual connections holded by this connection pool. In other words, the sum of used and available connections, regardless DOCUMENT ME!



getSdeLayer
public SeLayer getSdeLayer(String typeName) throws NoSuchElementException, IOException(Code)



getSdeLayer
public synchronized SeLayer getSdeLayer(SeConnection conn, String typeName) throws NoSuchElementException, IOException(Code)
DOCUMENT ME!
Parameters:
  typeName - DOCUMENT ME! DOCUMENT ME!
throws:
  NoSuchElementException - DOCUMENT ME!
throws:
  IOException - DOCUMENT ME!



getSdeTable
public SeTable getSdeTable(String tableName) throws DataSourceException(Code)



getSdeTable
public SeTable getSdeTable(SeConnection conn, String tableName) throws DataSourceException(Code)
DOCUMENT ME!
Parameters:
  tableName - DOCUMENT ME! DOCUMENT ME!
throws:
  DataSourceException - DOCUMENT ME!



markConnectionAsFailed
public synchronized void markConnectionAsFailed(ArcSDEPooledConnection conn)(Code)
Sometimes (and largely without reason) ArcSDEPooledConnections (really their underlying SeConnection objects) just poop out. They start behaving strangely, or not behaving at all. You can tell the pool that a particular SeConnection has 'Failed' using this method, and it will do its best to get it out of the pool as soon as you release your hold on it.
Parameters:
  conn -



toString
public String toString()(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.