I think I figured it out. Calling SingleConnectionFactory.destroy() fixes this problem.
-Arul
Type: Posts; User: aruld; Keyword(s):
I think I figured it out. Calling SingleConnectionFactory.destroy() fixes this problem.
-Arul
Hi,
I am trying to publish a message from my application and once the message is published I need to dispose the underlying RabbitMQ connection used by the template. I do see this logic already in...
Thanks Chris for the update.
I will try with M5.
-Arul
Post construction configuration does not retain original configurations. I am not sure if this is the expected behavior. I am using M4.
Here is my test:
JavaConfigApplicationContext...
Chris,
I added the maven project to the JIRA. Hope this helps.
Thanks.
Arul
Hi Chris,
No problem.
Sure I can package it as a maven project and resubmit to the JIRA later today.
Thanks once again for taking time to look into this issue.
Best regards,
Arul
Hi Chris,
Did you had any chance to look into this issue? Do you think of any work around for this problem? We have been stuck with this for a while.
On a different note, I was reading the blog...
Chris,
I created a JIRA issue (http://jira.springframework.org/browse/SJC-247) and attached the original test case to the issue.
Thanks for your support again.
-Arul
Hi Chris,
I tried creating a simple test case without using database, but I was not able to derive a similar use case for scoping. I suspect this problem could not be reproduced without the...
Thanks Chris for your suggestion.
I did not specify the scope earlier. I just added prototype scope to my DaoImpl class and tested. But, it seems to have no effect.
Here is my DaoImpl code:
...
Hi,
I am trying to do lazy init my database configuration so that I can override default configuration at runtime. I have tried different combinations using Lazy and Prototype scopes, but with out...
Congratulations Chris on this major milestone. SJC rocks!
-Arul
When I try to query JPA entities with this approach, I get the below error.
Exception in thread "main" org.springframework.transaction.CannotCreateTransactionException: Could not open JPA...
I posted too quickly :)
If I try your other suggestion by making the DataSource bean @Bean(scope=DefaultScopes.PROTOTYPE), this works.
Do you think this approach guarantees this to work in all...
Hi Chris,
This works only if I include DataSourceConfiguration to the JavaConfigApplicationContext. If I include both DataSourceConfiguration and JpaConfiguration, the override does not work. It...
Thanks Chris.
It worked like a charm as always with SJC :)
-Arul
Hi Chris,
I have the following test case which fails to override the bean configuration after context creation. Could you please correct me if I am missing something in my configuration?
...
I am not sure how the bean inheritance is supported in JavaConfig. May be someone in this forum can chime in. I prefer to use Spring 2+ Transaction configuration as they are less verbose and...
Here is a comprehensive working example using JavaConfig (uses standalone HSQL server with a simple foo table). This java configuration can be further simplified if you use annotation driven...
Chris,
I was able to resolve this issue after going through some of the system tests.
Btw, did you had a chance to look in to the code which I submitted for...
Hi Mike,
Here is my first attempt to explain possible cause for this behavior in SJC. As per the first test, bootstrapping JavaConfig from XML with ConfigurationPostProcessor works just fine,...
Hi Mike,
I was able to successfully CRUD using your configuration in Tomcat6/Postgres for the PetClinic sample bundled with SJC, only with a slight modification.
I see your configuration is...
@ResourceBundles was removed in favor of @PropertiesValueSource in M4-snapshots (per http://jira.springframework.org/browse/SJC-169).
-Arul
Michele,
This should work for you. It also includes a simple test.
public class HessianTest {
@Test
public void testHessianConfig() {
ClassPathXmlApplicationContext bf =...
Mike,
@AnnotationDrivenTx behaves exactly like <tx:annotation-driven/>. It assumes that you have a bean named 'transactionManager' and your services are annotated with @Transactional attribute.
...