Examples of Transactional


Examples of com.sun.jersey.samples.bookmark_em.util.tx.Transactional

    public void deleteUser() {
        if (null == userEntity) {
            throw new NotFoundException("userid " + userid + "does not exist!");
        }

        TransactionManager.manage(utx, new Transactional(em) { public void transact() {
            em.persist(userEntity);
            em.remove(userEntity);
        }});
    }
View Full Code Here

Examples of com.sun.jersey.samples.bookmark_em.util.tx.Transactional

        bookmarkEntity.setUpdated(new Date());
        bookmarkEntity.setSdesc(bookmark.getString("sdesc"));
        bookmarkEntity.setLdesc(bookmark.getString("ldesc"));
        userResource.getUserEntity().getBookmarkEntityCollection().add(bookmarkEntity);

        TransactionManager.manage(utx, new Transactional(em) { public void transact() {
            em.merge(userResource.getUserEntity());
        }});

        URI bookmarkUri = uriInfo.getAbsolutePathBuilder().
                path(bookmarkEntity.getBookmarkEntityPK().getBmid()).
View Full Code Here

Examples of com.sun.jersey.samples.bookmark_em.util.tx.Transactional

        bookmarkEntity.setLdesc(jsonEntity.getString("ldesc"));
        bookmarkEntity.setSdesc(jsonEntity.getString("sdesc"));
        bookmarkEntity.setUpdated(new Date());
       
        TransactionManager.manage(utx, new Transactional(em) { public void transact() {
            em.merge(bookmarkEntity);
        }});
    }   
View Full Code Here

Examples of com.sun.jersey.samples.bookmark_em.util.tx.Transactional

        }});
    }   
   
    @DELETE
    public void deleteBookmark() {
        TransactionManager.manage(utx, new Transactional(em) { public void transact() {
            em.persist(bookmarkEntity);
            UserEntity userEntity = bookmarkEntity.getUserEntity();
            userEntity.getBookmarkEntityCollection().remove(bookmarkEntity);
            em.merge(userEntity);
            em.remove(bookmarkEntity);
View Full Code Here

Examples of com.sun.xml.ws.api.tx.at.Transactional

         * to the EJB deployment descriptor, which could lead to inconsistent WS-AT configuration
         * behavior between EJB + annotations and EJB + DD use cases
         */
        // final EjbTransactionType defaultEjbTxnAttr = EjbTransactionType.getDefaultFor(seiClass);
        final EjbTransactionType defaultEjbTxnAttr = EjbTransactionType.NOT_DEFINED;
        final Transactional defaultFeature = seiClass.getAnnotation(Transactional.class);
        for (JavaMethod method : model.getJavaMethods()) {
            final Transactional effectiveFeature = getEffectiveFeature(method.getSEIMethod(), defaultFeature);
            if (effectiveFeature == null || effectiveFeature.enabled() == false) {
                continue;
            }

            final EjbTransactionType effectiveEjbTxType = defaultEjbTxnAttr.getEffectiveType(method.getSEIMethod());

            final String policyId = model.getBoundPortTypeName().getLocalPart() + "_" + method.getOperationName() + "_WSAT_Policy";
            final Policy policy = AtPolicyCreator.createPolicy(policyId, effectiveFeature.version().namespaceVersion, effectiveFeature.value(), effectiveEjbTxType);
            if (policy != null) {
                // attach ws-at policy assertion to binding/operation
                final WsdlBindingSubject wsdlSubject = WsdlBindingSubject.createBindingOperationSubject(model.getBoundPortTypeName(),
                        new QName(model.getTargetNamespace(), method.getOperationName()));
                final PolicySubject generatedWsatPolicySubject = new PolicySubject(wsdlSubject, policy);
                if (LOGGER.isLoggable(Level.FINE)) {
                    LOGGER.fine(LocalizationMessages.WSAT_1002_ADD_AT_POLICY_ASSERTION(
                            model.getPortName().toString(),
                            method.getOperationName(),
                            seiClass.getName(),
                            method.getSEIMethod().getName(),
                            effectiveFeature.value().toString(),
                            effectiveEjbTxType.toString(),
                            policy.toString()));
                }
                subjects.add(generatedWsatPolicySubject);
            }
View Full Code Here

Examples of fi.evident.dalesbred.Transactional

public final class DalesbredSpringAnnotationParser implements TransactionAnnotationParser {

    @Override
    @Nullable
    public TransactionAttribute parseTransactionAnnotation(AnnotatedElement ae) {
        Transactional ann = AnnotationUtils.getAnnotation(ae, Transactional.class);
        if (ann != null) {
            return parseTransactionAnnotation(ann);
        } else {
            return null;
        }
View Full Code Here

Examples of net.hasor.db.transaction.interceptor.simple.Transactional

}
/**决定传播属性*/
class PropagationStrategy implements TranStrategy<Propagation> {
    @Override
    public Propagation getStrategy(final Method targetMethod) {
        Transactional tranAnno = targetMethod.getAnnotation(Transactional.class);
        if (tranAnno == null) {
            return Propagation.REQUIRED;//默认设置
        }
        return tranAnno.propagation();
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.Transactional

            return ProviderHelper.notfound(request);
        }

        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional) adapter : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
            response = response != null ? response : processExtensionRequest(request, adapter);           
View Full Code Here

Examples of org.apache.abdera.protocol.server.Transactional

            return ProviderHelper.notfound(request);
        }

        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional)adapter : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
            response = response != null ? response : processExtensionRequest(request, adapter);
View Full Code Here

Examples of org.apache.abdera.protocol.server.Transactional

            return ProviderHelper.notfound(request);
        }

        WorkspaceManager wm = getWorkspaceManager(request);
        CollectionAdapter adapter = wm.getCollectionAdapter(request);
        Transactional transaction = adapter instanceof Transactional ? (Transactional) adapter
                : null;
        ResponseContext response = null;
        try {
            transactionStart(transaction, request);
            response = processor.process(request, wm, adapter);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.