processing where this translator is needed. Here is an example of how
this custom translator can be used:</para>
<programlisting><lineannotation>// create a <classname>JdbcTemplate</classname> and set data source</lineannotation>
<programlistinglanguage="java"><lineannotation>// create a <classname>JdbcTemplate</classname> and set data source</lineannotation>
JdbcTemplate jt = new JdbcTemplate();
jt.setDataSource(dataSource);
<lineannotation>// create a custom translator and set the <interfacename>DataSource</interfacename> for the default translation lookup</lineannotation>
...
...
@@ -799,7 +799,7 @@ su.update();</programlisting>
what you need to include for a minimal but fully functional class that
@@ -696,7 +696,7 @@ public class DefaultFooService implements FooService {
be started, suspended, be marked as read-only, etc., depending on the
transaction configuration associated with that method. Consider the following
program that test drives the above configuration.</para>
<programlisting><![CDATA[public final class Boot {
<programlistinglanguage="java"><![CDATA[public final class Boot {
public static void main(final String[] args) throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("context.xml", Boot.class);
...
...
@@ -710,7 +710,7 @@ public class DefaultFooService implements FooService {
<methodname>insertFoo(..)</methodname> method of the
<classname>DefaultFooService</classname> class have been truncated in
the interest of clarity.)</emphasis></para>
<programlisting><lineannotation><emphasisrole="bold"><!-- the Spring container is starting up... --></emphasis></lineannotation><![CDATA[
<programlistinglanguage="xml"><lineannotation><emphasisrole="bold"><!-- the Spring container is starting up... --></emphasis></lineannotation><![CDATA[
for bean 'fooService' with 0 common interceptors and 1 specific interceptors
]]><lineannotation><emphasisrole="bold"><!-- the <classname>DefaultFooService</classname> is actually proxied --></emphasis></lineannotation><![CDATA[
...
...
@@ -767,7 +767,7 @@ Exception in thread "main" java.lang.UnsupportedOperationException
for rollback can be configured. Find below a snippet of XML configuration that
demonstrates how one would configure rollback for a checked, application-specific
@@ -1640,7 +1631,7 @@ public class SimpleProfiler implements Ordered {
<xreflinkend="transaction-declarative-annotations"/> and <xreflinkend="aop"/>
respectively.</para>
</note>
<programlisting><lineannotation>// construct an appropriate transaction manager </lineannotation><![CDATA[
<programlistinglanguage="java"><lineannotation>// construct an appropriate transaction manager </lineannotation><![CDATA[
DataSourceTransactionManager txManager = new DataSourceTransactionManager(getDataSource());
]]><lineannotation>// configure the <classname>AnnotationTransactionAspect</classname> to use it; this must be done before executing any transactional methods</lineannotation><![CDATA[