@Override
    public T execute(Object... args) throws Throwable {
        String xid = RootContext.getXID();
        if (xid != null) {
            statementProxy.getConnectionProxy().bind(xid);
        }

        statementProxy.getConnectionProxy().setGlobalLockRequire(RootContext.requireGlobalLock());
        return doExecute(args);
    }
@SuppressWarnings({"rawtypes", "unchecked"})
    @Test
    public void testExecuteWithGlobalLockSet() throws Throwable {

        //initial objects
        ConnectionProxy connectionProxy = new ConnectionProxy(null, null);
        StatementProxy statementProxy = new StatementProxy<>(connectionProxy, null);

        BaseTransactionalExecutor<Object, Statement> baseTransactionalExecutor
                = new BaseTransactionalExecutor<Object, Statement>(statementProxy, null, (SQLRecognizer) null) {
            @Override
            protected Object doExecute(Object... args) {
                return null;
            }
        };
        GlobalLockTemplate template = new GlobalLockTemplate();

        // not in global lock context
        try {
            baseTransactionalExecutor.execute(new Object());
            Assertions.assertFalse(connectionProxy.isGlobalLockRequire(), "connection context set!");
        } catch (Throwable e) {
            throw new RuntimeException(e);
        }

        // in global lock context
        template.execute(new GlobalLockExecutor() {
            @Override
            public Object execute() throws Throwable {
                baseTransactionalExecutor.execute(new Object());
                Assertions.assertTrue(connectionProxy.isGlobalLockRequire(), "connection context not set!");
                return null;
            }

            @Override
            public GlobalLockConfig getGlobalLockConfig() {
                return null;
            }
        });
    }