Package org.jboss.dashboard.factory

Examples of org.jboss.dashboard.factory.FactoryWork


     * @throws javax.servlet.ServletException Description of the Exception
     */
    public void init() throws ServletException {
        initServletDirectories();
        initFactory();
        Factory.doWork(new FactoryWork() {
        public void doWork() {
            try {
                Application.lookup().start();
                initSuccess = true;
            } catch (Throwable e) {
View Full Code Here


     * @param request  Object that encapsulates the request to the servlet.
     * @param response Object that encapsulates the response from the servlet.
     */
    public final void service(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
        if (initSuccess) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    try {
                        HTTPSettings webSettings = HTTPSettings.lookup();
                        request.setCharacterEncoding(webSettings.getEncoding());
                    } catch (UnsupportedEncodingException e) {
View Full Code Here

    }

    public static Object runWork(final HibernateWork work) throws Throwable {
        final Throwable[] error = new Throwable[] {null};
        final Object[] result = new Object[] {null};
        Factory.doWork(new FactoryWork() {
        public void doWork() {
            try {
                new HibernateTxFragment() {
                protected void txFragment(Session session) throws Throwable {
                    result[0] = work.doWork(session);
View Full Code Here

    // Runnable interface

    public void run() {
        while (running) {
            Factory.doWork(new FactoryWork() {
            public void doWork() {
                try {
                    // Save the stack traces for the current active transactions.
                    dumpStackTraces();
View Full Code Here

        return globalFactory;
    }

    public void setGlobalFactory(Factory globalFactory) {
        if (this.globalFactory != null) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    Application.this.globalFactory.destroy();
                }
            });
        }
View Full Code Here

    // Runnable interface

    public void run() {
        while (running) {
            Factory.doWork(new FactoryWork() {
            public void doWork() {
                try {
                    // Save the stack traces for the current active transactions.
                    dumpStackTraces();
View Full Code Here

        return globalFactory;
    }

    public void setGlobalFactory(Factory globalFactory) {
        if (this.globalFactory != null) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    Application.this.globalFactory.destroy();
                }
            });
        }
View Full Code Here

        return globalFactory;
    }

    public void setGlobalFactory(Factory globalFactory) {
        if (this.globalFactory != null) {
            Factory.doWork(new FactoryWork() {
                public void doWork() {
                    Application.this.globalFactory.destroy();
                }
            });
        }
View Full Code Here

            return info;
        }
    }

    public int doStartTag() throws JspException {
        Factory.doWork(new FactoryWork() { //In case this is called from a pure jsp...
            public void doWork() {
                pageContext.getRequest().setAttribute(ENVELOPE_TOKEN, Boolean.TRUE);
/*
                // Removed due to incompatibilities with some charting libraries
                try {
View Full Code Here

     * @throws javax.servlet.ServletException Description of the Exception
     */
    public void init() throws ServletException {
        initAppDirectories();
        initFactory();
        Factory.doWork(new FactoryWork() {
        public void doWork() {
            try {
                Application.lookup().start();
                initSuccess = true;
            } catch (Throwable e) {
View Full Code Here

TOP

Related Classes of org.jboss.dashboard.factory.FactoryWork

Copyright © 2018 www.massapicom. 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.