Search:

Type: Posts; User: libor.subcik; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.04 seconds.

  1. How do you define the AOP pointcut? It looks like...

    How do you define the AOP pointcut? It looks like it matches a bean of type CacheManager from ehcache. Since the CacheManager class does not implement any interface, cglib is used. And because cglib...
  2. What Spring gives you is to configure a bean...

    What Spring gives you is to configure a bean wiring and maybe some AOP or lifecycle callbacks and do "its magic" to creating the beans according the rules you define. So you can tell, how to create a...
  3. >> But, I don't get any debug messages ... You...

    >> But, I don't get any debug messages ...
    You should see any debug message at least when CRUDServiceBean#create() is called.

    >> This means that a because the IB application runs in a separate...
  4. Replies
    1
    Views
    419

    Hi >> it seems there should be a more flexible...

    Hi
    >> it seems there should be a more flexible way
    Do you have a real use case for this? Since there is no support for this, it is probably not that common.
    A harsh way to change Advice order on a...
  5. Hi, since Spring 3.1, you can use profiles...

    Hi,
    since Spring 3.1, you can use profiles. Or you can manage different configurations by factoring out all differences into separate configuration xml files and choose the right file(s) in a build...
  6. From the exception string you have posted it is...

    From the exception string you have posted it is obvious that you have a transaction manager set up. I assume that you use <tx:annotation-driven />. Ensure that crudService.create(...) is called in...
  7. Hi, you have several options here. If you don't...

    Hi, you have several options here. If you don't have a control over creating instances of the class, you can use @Configurable annotation in combination with AspectJ weaving to register it as a...
  8. Do you have any general consumer interface with...

    Do you have any general consumer interface with many implementations that consume different data? If not, the best way is to create void consumeData(List<ResultObject> list) in your Consumer method....
  9. Replies
    2
    Views
    299

    Singleton beans are created on startup by default...

    Singleton beans are created on startup by default (you can use "lazy" attribute to create them when they are accessed for the first time). There is only one instance of each singleton of course.
    As...
  10. Is it necessary to have a mbean for each method?...

    Is it necessary to have a mbean for each method? Or is it sufficient to expose all the statistics to be accessible via one mbean? If so, you can collect the statistic in your aspect to a bean that...
  11. A bean is a factory definition for making class...

    A bean is a factory definition for making class instances. Once an instance is created, it has no reference to its bean definition. Therefore you cannot do pointcut matching on bean names at runtime....
  12. >>

    >> <bean id="nonStaticProducerDataFactory"
    The bean name does not sound good. You use a factory method, but the product of the method available under the id is a bean of type List. So it should by...
  13. Replies
    1
    Views
    190

    If you are able to determine the order, you...

    If you are able to determine the order, you probably know what beans are to be injected. You can create a bean of type list in a xml where you enumerate all beans you need (reference the beans by...
  14. Replies
    1
    Views
    179

    Prototypes are used where there is a state...

    Prototypes are used where there is a state mantained for each instance (you can use singleton when there is no inner bean state that should differs among instances).
    Let's say you want to have an...
  15. You can use @Component("dataProducer")...

    You can use


    @Component("dataProducer")
    public class DataProducer implements ProducerInterface{

    public List<ResultObject> getData(String param) {
    ....
    }
    }
  16. Replies
    1
    Views
    280

    First off, you have both definitions...

    First off, you have both <tx:advice> definitions with same id. It means that one overrides another. You should use <aop:advisor> in combination with <tx:advice> definition. @Transactional annotation...
  17. InitializingBean used on a bean registers a...

    InitializingBean used on a bean registers a lifecycle callback that applies to the bean on which it is used.
    BeanPostProcessor processes all beans in an application context but not self.
  18. Replies
    1
    Views
    196

    Spring tries to be smart here and infers a...

    Spring tries to be smart here and infers a dependency from the setter name. Eg. one of candidate beans has name myBean and the setter is named setMyBean(..).
  19. Hi. It looks like you have a jdk proxy around...

    Hi. It looks like you have a jdk proxy around your job bean. Make sure that no aspect you define is applied to the job bean.
    A quick dirty fix can be to use <aop:aspectj-autoproxy...
  20. Relying on default /META_INF subpackage location...

    Relying on default /META_INF subpackage location might not work in some circumstances. For example, in junit tests the packaging can be different than when deployed on an application server. Try to...
  21. Thank you for the reasonable explanation. Now I...

    Thank you for the reasonable explanation.
    Now I am curious why Spring does not merge these aspects to one proxy. Instead of proxying an existing proxy, it is possible (at least by the Spring proxy...
  22. Replies
    1
    Views
    289

    Bean inheritance is a way to move common part of...

    Bean inheritance is a way to move common part of configuration to a parent bean. It has nothing to do with Java class inheritance. So there is no parent class, there is only a bean target class that...
  23. Hello. Spring helps you to manage your...

    Hello.
    Spring helps you to manage your application components, makes database access easier,provides declarative transaction management, exposes rest services easily.

    As a communitacion protocol,...
  24. Your persistence-test.xml should point to a...

    Your persistence-test.xml should point to a location where the entities reside. Since Spring 3.1, you can use packagesToScan property on LocalContainerEntityManagerFactoryBean to completely avoid...
  25. vs BeanNameAutoproxyCreator compatibility

    Hi, Spring documentation states a warning message:
    The <aop:config> style of configuration makes heavy use of Spring's auto-proxying mechanism. This can cause issues (such as advice not being woven)...
Results 1 to 25 of 39
Page 1 of 2 1 2