Announcement Announcement Module
Collapse
No announcement yet.
How i can use @Autowired annotation whe use a Quartz Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How i can use @Autowired annotation whe use a Quartz

    Hi

    Im using Quartz in my project Spring MVC + Hibernate, my problem is when a try to crate a job with quartz i need use a Spring @autowired, I call the executeInternal(..) function an that is fine but when i try to use @Autowired, the value of the instance of my Dao is null, ive read other forums but the solution:


    <bean name="schedulerFactory" class="org.springframework.scheduling.quartz.Sched ulerFactoryBean">
    <property name="schedulerContextAsMap">
    <map>
    <entry key="myDao" value-ref="myDao" />
    </map>
    </property>

    doesnt work for me because i get the Dao but this Dao returns null when i try to access to the database.
    Please i need help with that
    Thanks
Working...
X