Package javax.resource.spi.work

Examples of javax.resource.spi.work.Work


        assertNull(connector.getScheduler());
    }

    protected Work createSomeWork()
    {
        return new Work()
        {
            public void run()
            {
                System.out.println("I'm doing some work");
            }
View Full Code Here


                        if (logger.isTraceEnabled())
                        {
                            logger.trace("Received packet on: " + uri);
                        }

                        Work work = createWork(packet);
                        try
                        {
                            getWorkManager().scheduleWork(work, WorkManager.INDEFINITE, null, connector);
                        }
                        catch (WorkException e)
View Full Code Here

                                }
                            }

                            if (socket != null)
                            {
                                Work work = createWork(socket);
                                getWorkManager().scheduleWork(work, WorkManager.INDEFINITE, null, connector);
                            }
                        }

                        public String getWorkDescription()
View Full Code Here

        try {
            FTPFile[] files = ftp.listFiles(getWorkingPath());
            for (int i = 0; i < files.length; i++) {
                final FTPFile file = files[i];
                workingSet.add(file);
                getWorkManager().scheduleWork(new Work() {
                    public void run() {
                        processFile(file);
                    }

                    public void release() {
View Full Code Here

     * MessageListener implementation
     * @param jmsMessage
     */
    public void onMessage(final Message jmsMessage) {
        try {
            workManager.scheduleWork(new Work() {
                public void release() {
                }
                public void run() {
                    handleMessage(jmsMessage);
                }
View Full Code Here

        if (!workingSet.contains(aFile)) {
            workingSet.add(aFile);
            if (log.isDebugEnabled()) {
                log.debug("Scheduling file " + aFile + " for processing");
            }
            getWorkManager().scheduleWork(new Work() {
                public void run() {
                    processFileAndDelete(aFile);
                }

                public void release() {
View Full Code Here

        }
        for (int i = 0; i < files.length; i++) {
            final FileObject file = files[i];
            if (!workingSet.contains(file)) {
                workingSet.add(file);
                getWorkManager().scheduleWork(new Work() {
                    public void run() {
                        processFileAndDelete(file);
                    }

                    public void release() {
View Full Code Here

                ObjectMessage objMsg = (ObjectMessage) message;
                final MessageExchangeImpl me = (MessageExchangeImpl) objMsg.getObject();
                // Dispatch the message in another thread so as to free the jms session
                // else if a component do a sendSync into the jms flow, the whole
                // flow is deadlocked
                broker.getContainer().getWorkManager().scheduleWork(new Work() {
                    public void release() {
                    }

                    public void run() {
                        try {
View Full Code Here

        endpointRegistry.unregisterRemoteEndpoint((InternalEndpoint) endpoint);
    }

    public void checkPendingAssemblies() {
        try {
            getContainer().getWorkManager().scheduleWork(new Work() {
                public void release() {
                }
                public void run() {
                    startPendingAssemblies();
                }
View Full Code Here

        }
    }

    public void checkPendingComponents() {
        try {
            getContainer().getWorkManager().scheduleWork(new Work() {
                public void release() {
                }
                public void run() {
                    startPendingComponents();
                }
View Full Code Here

TOP

Related Classes of javax.resource.spi.work.Work

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.