The Artima Developer Community
Sponsored Link

Java Buzz Forum
Solved: Advice on Started Threads

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
Solved: Advice on Started Threads Posted: May 13, 2004 4:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: Solved: Advice on Started Threads
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

Moved the subject into a WeakHashMap keyed to Thread and simply populated it based on the started thread =)

package org.skife.objectfilter;

public aspect AssociateSubjectWithSpawnedThreads
{
    pointcut startThread(Thread thread): target(thread)
                                         && call(void java.lang.Thread.start());

    before(Thread thread) : startThread(thread) {
        Filter.instance().setSubject(thread, Filter.instance().getSubject());
    }
}

Next glaring hole: block ability to change subject except when allowed by a given pointcut. Funny how most of the configuration for this tool is pointcut definition.

My goal for ObjectFilter, btw, is to give someone the ability to execute arbitrary code (Groovy, BeanShell, Jython, etc) in a VM, with access to the sources for whatever is in it, and still be able to prevent any information leakage =)

Pushed newest tarball as well. Lots of minor changes.

Read: Solved: Advice on Started Threads

Topic: Blogging from Ant Previous Topic   Next Topic Topic: Fancy a pack of cards with Hani and Marc Fleury as the jokers?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use