Java Doc for ConnectionRepositoryEntry.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » components » rdbms » ojb » 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 » Portal » jetspeed 2.1.3 » org.apache.jetspeed.components.rdbms.ojb 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.jetspeed.components.rdbms.ojb.ConnectionRepositoryEntry

ConnectionRepositoryEntry
public class ConnectionRepositoryEntry extends BasicDataSource implements BeanNameAware,InitializingBean(Code)
A JavaBean that configures an entry in OJB's ConnectionRepository according to its properties. If a JCD alias is not specified, it defaults to the bean's name in the Spring configuration. If the JDBC connection descriptor already exists (e.g. because it has been defined in OJB's configuration) the properties are merged into the existing descriptor (see note about "platform" below), else the JDBC connection descriptor is created.

If a JNDI name is set, the bean automatically configures a JDBC connection descriptor with a connection factory of type ConnectionFactoryManagedImpl, else it uses ConectionFactoryDBCPImpl. This may be overridden my setting the connection factory property explicitly.

Properties "driverClassName", "url", "username" and "password" are used only if no JNDI name is set, i.e. if the connection factory uses the driver to create data sources.

The bean derives the RDBMS platform setting from the configured data source or database driver using OJB's JdbcMetadataUtils class. At least until OJB 1.0.3, however, this class does not properly distinguish the platforms "Oracle" and "Oracle9i"; it always assigns "Oracle". In case of "Oracle", this bean therefore opens a connection, obtains the version information from the database server and adjusts the platform accordingly. This behaviour may be overridden by setting the platform property of the bean explicitly. Note that the attribute "platform" of an already existing JCD is ignored. An already existing JCD stems most likely from a configuration file "repository.xml". As the DTD for "repository.xml" ("repository.dtd") defines a default value for attribute "platform" ("Hsqldb"), it is in general impossible to find out whether the platform attribute of an existing JCD has been set explicitly or has simply assumed its default value.
author:
   Michael Lipp
version:
   $Id$




Constructor Summary
public  ConnectionRepositoryEntry()
    

Method Summary
public  voidafterPropertiesSet()
    
public  ConnectiongetConnection()
    
public  ConnectiongetConnection(String username, String password)
    
public  StringgetDriverClassName()
    
public  StringgetJcdAlias()
    
public  StringgetJndiName()
    
public  StringgetPassword()
    
public  StringgetPlatform()
    
public  StringgetUrl()
    
public  StringgetUsername()
    
public  booleanisJetspeedEngineScoped()
    
public  voidsetBeanName(String beanName)
    
public  voidsetDriverClassName(String driverClassName)
    
public  voidsetJcdAlias(String jcdAlias)
    
public  voidsetJetspeedEngineScoped(boolean jetspeedEngineScoped)
     Sets the attribute "org.apache.jetspeed.engineScoped" of the JDBC connection descriptor to "true" or "false".
public  voidsetJndiName(String jndiName)
    
public  voidsetPassword(String password)
    
public  voidsetPlatform(String platform)
     Set the platform attribute of the JCD.
public  voidsetUrl(String url)
    
public  voidsetUsername(String username)
    


Constructor Detail
ConnectionRepositoryEntry
public ConnectionRepositoryEntry()(Code)




Method Detail
afterPropertiesSet
public void afterPropertiesSet() throws Exception(Code)



getConnection
public Connection getConnection() throws SQLException(Code)



getConnection
public Connection getConnection(String username, String password) throws SQLException(Code)



getDriverClassName
public String getDriverClassName()(Code)
Returns the driverClassName.



getJcdAlias
public String getJcdAlias()(Code)
Returns the jcdAlias.



getJndiName
public String getJndiName()(Code)
Returns the jndiName.



getPassword
public String getPassword()(Code)
Returns the password.



getPlatform
public String getPlatform()(Code)
Returns the platform.



getUrl
public String getUrl()(Code)
Returns the url.



getUsername
public String getUsername()(Code)
Returns the username.



isJetspeedEngineScoped
public boolean isJetspeedEngineScoped()(Code)

See Also:   setJetspeedEngineScoped Returns if Jetspeed engine's ENC is used for JNDI lookups.



setBeanName
public void setBeanName(String beanName)(Code)

See Also:   org.springframework.beans.factory.BeanNameAware.setBeanName(java.lang.String)



setDriverClassName
public void setDriverClassName(String driverClassName)(Code)

Parameters:
  driverClassName - The driverClassName to set.



setJcdAlias
public void setJcdAlias(String jcdAlias)(Code)

Parameters:
  jcdAlias - The jcdAlias to set.



setJetspeedEngineScoped
public void setJetspeedEngineScoped(boolean jetspeedEngineScoped)(Code)
Sets the attribute "org.apache.jetspeed.engineScoped" of the JDBC connection descriptor to "true" or "false". If set, JNDI lookups of the connection will be done using the environment naming context (ENC) of the Jetspeed engine.
Parameters:
  jetspeedEngineScoped - whether to use Jetspeed engine's ENC.



setJndiName
public void setJndiName(String jndiName)(Code)

Parameters:
  jndiName - The jndiName to set.



setPassword
public void setPassword(String password)(Code)

Parameters:
  password - The password to set.



setPlatform
public void setPlatform(String platform)(Code)
Set the platform attribute of the JCD. Setting this property overrides the value derived from the data source or database driver.
Parameters:
  platform - The platform to set.



setUrl
public void setUrl(String url)(Code)

Parameters:
  url - The url to set.



setUsername
public void setUsername(String username)(Code)

Parameters:
  username - The username to set.



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