Posts

Showing posts with the label spring-jdbc

int-jdbc:inbound-channel-adapter channel depth

Image
Clash Royale CLAN TAG #URR8PPP int-jdbc:inbound-channel-adapter channel depth if the configured channel in int-jdbc:inbound-channel-adapter is full,after that polling happens or not ? Can I use a queue channel in int-jdbc:inbound-channel-adapter? My requirement is that if the channel is full,no DB call should make ,until channel is free. 1 Answer 1 You need to use a QueueChannel with restricted capacity. As far as any Inbound Channel Adapter uses a MessagingTemplate with the sendTimeout = -1 , the QueueChannel performs a put() operation on the underlying LinkedBlockingQueue : QueueChannel MessagingTemplate sendTimeout = -1 QueueChannel put() LinkedBlockingQueue /** * Inserts the specified element at the tail of this queue, waiting if * necessary for space to become available. * * @throws InterruptedException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ public void put(E e)...

Passing an ArrayList of Java Objects While Calling a Stored Procedure Using Spring JDBC

Image
Clash Royale CLAN TAG #URR8PPP Passing an ArrayList of Java Objects While Calling a Stored Procedure Using Spring JDBC What is the Right approach for passing an arraylist of java objects to a stored procedure. Internally the Stored procedure expects a collection of a particular data type . Currently i am trying the following but it is not working example : //Setting the JdbcCall Object SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate) .withProcedureName("name") .withCatalogName("catalog") .withoutProcedureColumnMetaDataAccess() .declareParameters(new SqlParameter( "input_parameter1", Types.ARRAY, "SAMPLELIST"), new SqlOutParameter("P_ERROR_MESSAGE" , Types.VARCHAR)); //Creating the list of objects to be sent to proc List<SampleObject> list = new ArrayList<>...

Redshift jdbc connection configuration with Spring boot 2 not working

Image
Clash Royale CLAN TAG #URR8PPP Redshift jdbc connection configuration with Spring boot 2 not working Here are my dependencies in build.gradle. compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.2.RELEASE' compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '2.0.3.RELEASE' compile group: 'postgresql', name: 'postgresql', version: '9.1-901-1.jdbc4' compile group: 'com.amazon.redshift', name: 'redshift-jdbc42', version: '1.2.10.1009' compile group: 'org.eclipse.jetty', name: 'jetty-util', version: '9.4.11.v20180605' compile group: 'org.hibernate', name: 'hibernate-java8', version: '5.0.0.CR1' compile group: 'com.vladmihalcea', name: 'hibernate-types-52', version: '2.2.2' When I start my application,It's not able to start tomcat server. I am get...