package org.zanata.dao;

import org.hibernate.Session;
import javax.inject.Named;
import org.zanata.model.HApplicationConfiguration;

@Named("applicationConfigurationDAO")

@javax.enterprise.context.Dependent
public class ApplicationConfigurationDAO extends
        AbstractDAOImpl<HApplicationConfiguration, Long> {

    public ApplicationConfigurationDAO() {
        super(HApplicationConfiguration.class);
    }

    public ApplicationConfigurationDAO(Session session) {
        super(HApplicationConfiguration.class, session);
    }

    public HApplicationConfiguration findByKey(String key) {
        return (HApplicationConfiguration) getSession()
                .byNaturalId(HApplicationConfiguration.class).using("key", key)
                .load();
    }

}

@@ -47,16 +47,64 @@
 Session;
+%0A%0Aimport javax.enterprise.context.RequestScoped;
 %0Aimport 
@@ -219,42 +219,21 @@
 )%0A%0A@
-javax.enterprise.context.Dependent
+RequestScoped
 %0Apub

update dao scope to RequestScope