Results 1 to 3 of 3

Thread: BEanFactory Problem

  1. #1

    Default BEanFactory Problem

    iam using BeanFactory to et the beans y tranasations & aops are not working


    ClassPathResource cpr=new ClassPathResource("<path>");
    XmlBeanFactory xnb=new XmlBeanFactory(cpr);
    cpr.getBean("<beanName>");

    every thing is working fine but transaction is not working not commirring the transaction when needed & not saving the record in database.

  2. #2
    Join Date
    Apr 2006
    Location
    Montreal, Canada
    Posts
    178

    Default

    We will need a lot more information than this to help you solve your problem. What does your applicationContext.xml file look like? How are you using the retrieved beans? You're saying AOP isn't working, are you using compile-time or load-time weaving? Are you getting any error messages?

    Cheers,
    GB

  3. #3
    Join Date
    Aug 2006
    Location
    Now Germany, previously Ukraine
    Posts
    1,546

    Default

    As it was stated a lot of information needed for definitive answer is missing, but...

    I'm pretty sure that your problem is that you use plain BeanFactory and not ApplicationContext. BeanFactory lacks a lot of automation and should not be used unless you have a really good reasons to use it (and such reasons are rare). ApplicationContext should be used in the most cases.

    Regards,
    Oleksandr

    Quote Originally Posted by khamuruddeen View Post
    iam using BeanFactory to et the beans y tranasations & aops are not working


    ClassPathResource cpr=new ClassPathResource("<path>");
    XmlBeanFactory xnb=new XmlBeanFactory(cpr);
    cpr.getBean("<beanName>");

    every thing is working fine but transaction is not working not commirring the transaction when needed & not saving the record in database.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •