40. What is SQLExceptionTranslator ?
SQLExceptionTranslator, is an interface to be implemented by classes that can translate between SQLExceptions and Spring's own data-access-strategy-agnostic org.springframework.dao.DataAccessException.
41. What is Spring's JdbcTemplate ?
Spring's JdbcTemplate is central class to interact with a database through JDBC. JdbcTemplate provides many convenience methods for doing things such as converting database data into primitives or objects, executing prepared and callable statements, and providing custom database error handling.
JdbcTemplate template = new JdbcTemplate(myDataSource);
42. What is PreparedStatementCreator ?
PreparedStatementCreator:
43. What is SQLProvider ?
SQLProvider:
44. What is RowCallbackHandler ?
The RowCallbackHandler interface extracts values from each row of a ResultSet.
45. What are the differences between EJB and Spring ?
Spring and EJB feature comparison.
Feature |
EJB |
Spring |
|
Transaction management |
|
|
|
Declarative transaction support |
|
|
|
Persistence |
Supports programmatic bean-managed persistence and declarative container managed persistence. |
Provides a framework for integrating with several persistence technologies, including JDBC, Hibernate, JDO, and iBATIS. |
|
Declarative security |
|
|
|
Distributed computing |
Provides container-managed remote method calls. |
Provides proxying for remote calls via RMI, JAX-RPC, and web services. |
|
46 . Do I need any other SOAP framework to run Spring Web Services?
You don't need any other SOAP framework to use Spring Web services, though it can use
some of the features of Axis 1 and 2.
47 . I get NAMESPACE_ERR exceptions when using Spring-WS. What can I do about it?
If you get the following Exception:
NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
Most often, this exception is related to an older version of Xalan being used. Make sure to upgrade to 2.7.0.
48 .Does Spring-WS run under Java 1.3?
Spring Web Services requires Java 1.4 or higher.
49. Does Spring-WS work under Java 1.4?
Spring Web Services works under Java 1.4, but it requires some effort to make it work. Java 1.4 is bundled with the older XML parser Crimson, which does not handle namespaces correctly. Additionally, it is bundled with an older version of Xalan, which also has problems. Unfortunately, placing newer versions of these on the class path does not override them. .
The only solution that works is to add newer versions of Xerces and Xalan in the lib/endorsed directory of your JDK, as explained in those FAQs (i.e.$JAVA_HOME/lib/endorsed). The following libraries are known to work with Java 1.4.2:
Library |
Version |
2.8.1 |
|
2.7.0 |
|
1.3.04 |
|
1.2 |
If you want to use WS-Security, note that the XwsSecurityInterceptor requires Java 5, because an underlying library (XWSS) requires it. Instead, you can use the Wss4jSecurityInterceptor.