Search:

Type: Posts; User: Coder; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,687

    Hi Pavla, Please check the...

    Hi Pavla,

    Please check the "persistenceXmlLocation" property below. If let commented out, it works, as Spring 2.5.6 will look for the default persistence.xml.

    If uncommented, Spring/Something...
  2. Replies
    4
    Views
    1,687

    The problem is the persistenceXmlLocation...

    The problem is the persistenceXmlLocation property. It puts the persistence file in a different class loaded from the POJO themselves. This looks like a bug...

    <bean id="bbsEntityManagerFactory"...
  3. Replies
    4
    Views
    1,687

    Spring JPA & Web App

    Hi all,

    I tried to use Spring 2.5.6 along with Hibernate/JPA within a WebApp in Tomcat from Netbeans/maven. It would seem like the EntityManager cannot find my annotated class. It works when I...
  4. Replies
    6
    Views
    2,766

    DataNucleus Support

    I use the below spring 2.5.6 config for JPA/Hibernate. How do I change that to JPA/DataNucleus (using JPA, not JDO). I could not find a suitable adapter.

    My classes are weaved with aspectJ at...
  5. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    Either a snippet or an object graph reflecting...

    Either a snippet or an object graph reflecting the same...
  6. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    Wouldn't it be nice to be able to pass in a...

    Wouldn't it be nice to be able to pass in a snippet of "<beans></beans" at runtime to Spring and have Spring add it to its application context? :)

    That would be cool...I think...
  7. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    I am hesitating over the part where my "scope...

    I am hesitating over the part where my "scope handler" instantiates the beans. Is there a way to delegate the "new" to Spring along with appropriate dependencies so Spring can wire up the objects?
    ...
  8. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    Refining

    Refining

    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close" scope="myScope">
    <aop:scoped-proxy/>
    </bean>

    <bean id="entityManagerFactory"...
  9. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    I am thinking that 1. Scoped proxy 2....

    I am thinking that

    1. Scoped proxy
    2. AbstractRoutingDataSource

    ought to do the trick. I can manipulate the AbstractRoutingDataSource at runtime to add/remove data sources.

    One key issue...
  10. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    So, the idea is that use custom scope in...

    So, the idea is that use custom scope in combination of some custom factory managing data sources. The custom factory can then be modified at runtime to manage additional or less data sources.
    ...
  11. Thread: Spring is Right?

    by Coder
    Replies
    10
    Views
    1,821

    Spring is Right?

    I have the following architecture requirements:

    1. Use JPA (hibernate), Spring, AOP (compile-time weaving), and @Transactional

    2. [Service Objects] <-> [Data Access Objects] <-> [Data Sources]...
  12. Replies
    0
    Views
    629

    Relationship between JPA Units

    I have two jpa units: basic-model and app-model

    app-model has Entities extends Entities in basic-model
    app-model also has Entities that have n-m relationships with Entities in basic-model

    When...
  13. Replies
    1
    Views
    1,000

    Spring, JPA, and Unit/Integration Test

    I am using JPA and my test classes needs access to an EntityManager so it can execute some SQL during setup/teardown.

    The issue I have is the test methods are using the same transaction as the...
  14. Replies
    1
    Views
    818

    Controlling Annotation Parameter

    class Bean
    {
    @Length(max=5)
    String value;
    }

    Is there a way to inject a max value from spring context? Ie. I'd like to avoid hard coding max=5. This is useful in case of library...
  15. Replies
    1
    Views
    1,053

    Spring AOP Transactions

    I am planning to use Spring AOP for Transaction, but because Spring AOP uses dynamic proxy, a self-call won't be "intercepted", but does it matter? Ie.

    @Transactional(rollbackFor =...
  16. Replies
    15
    Views
    7,279

    I followed your recommendation and it worked like...

    I followed your recommendation and it worked like a charm.

    Thanks all for helping and thanks all for being persistent!!! Great crew hanging around here!!!


    ClassPathXmlApplicationContext...
  17. Replies
    15
    Views
    7,279

    Here we go...thx! ClassPathResource...

    Here we go...thx!


    ClassPathResource resource = new ClassPathResource("spring-context.xml");
    BeanFactory factory = new XmlBeanFactory(resource);
    editor =...
  18. Replies
    15
    Views
    7,279

    You got the full relevant stack trace in the...

    You got the full relevant stack trace in the original post :), but here we go, the absolutely full deal...

    This line triggers the stack trace below...thx...

    sessionFactory.getCurrentSession();...
  19. Replies
    3
    Views
    3,378

    That sounds like my problem too :)

    That sounds like my problem too :)
  20. Replies
    15
    Views
    7,279

    Yes, I use mySQL 5.x, InnoDB and their...

    Yes, I use mySQL 5.x, InnoDB and their appropriate JDBC driver.

    I am scratching my head on the following debug from within Spring. You can see the it opened then closed the session...
  21. Replies
    15
    Views
    7,279

    Come on dude. If you have an inkling then out...

    Come on dude. If you have an inkling then out with it and be help instead of being a pain. You can clearly see in the original post the call() that produced the Spring stack trace...the rest is in...
  22. Replies
    15
    Views
    7,279

    Well, there is a stack trace and configuration in...

    Well, there is a stack trace and configuration in the original post. You can see that Spring tried to open the session only to close it immediately :)

    The stack trace shows what the code does :)
  23. Replies
    15
    Views
    7,279

    Any ideas anyone? Thanks...

    Any ideas anyone? Thanks...
  24. Replies
    2
    Views
    1,032

    Thanks for the idea. I decided that it is not...

    Thanks for the idea.

    I decided that it is not bad for the service method to throw exceptions, so we are going to go that route instead.

    Thanks!
  25. Replies
    2
    Views
    1,032

    Declarative Rollback

    public class MyService
    {

    @Transactional(rollbackFor=Exception.class)
    public MyRsp myServiceMethod()
    {
    MyRsp rsp = new MyRsp();
    try
    {
    ...;
Results 1 to 25 of 26
Page 1 of 2 1 2