Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-03-2008, 06:04 PM
Member
 
Join Date: Jun 2008
Posts: 4
sardare is on a distinguished road
isolated task in java
Hi,

I want to do a task in a separate thread in java where the task is completely isolated from the outside world and there is no way for it to access the outside world variables. How to enforce this restriction practically as the task is written by anyone and I am providing a wrapper around a task to prevent it from accessing outside world.

Is it something that can be done in java?

thanks,
samit
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-03-2008, 07:16 PM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
Quote:
access the outside world variables
Not sure what those are.
Quote:
to prevent it from accessing outside world.
What does that mean?
If you can control the ClassLoader that the task uses, you can control what classes it can instantiate.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 09-04-2008, 01:03 AM
Member
 
Join Date: Jun 2008
Posts: 4
sardare is on a distinguished road
Quote:
Originally Posted by Norm View Post
Not sure what those are.

outside the threads address space. e.g., class static variables that thread can access.

What does that mean?
If you can control the ClassLoader that the task uses, you can control what classes it can instantiate.
if I use a different class loader to instantiate my thread, it could still access the statics inside other classes and other shared variables..
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 09-04-2008, 02:43 AM
Norm's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Heredia, Costa Rica
Posts: 2,223
Norm is on a distinguished road
To isolate the task, you could start it in another JVM. You would need a very tight sandbox to isolate the program from the world.

What is the purpose of this isolation?

Have you looked at the SecurityManager class?

Last edited by Norm : 09-04-2008 at 05:12 AM.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 09-07-2008, 10:54 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 789
Nicholas Jordan is on a distinguished road
purpose?
The purpose of the isolation is of critical centrality in providing design studies. In general, for simple designs, all that is needful is to code carefull with stringent observation of code correctness. If it is a real security issue, then then you need to come in from a differerent window of ideas.

If possible, provide short - fabricated code snippets to model the design concern.

Is this a student or study project?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a custom task in Ant JavaForums Java Blogs 0 05-25-2008 01:40 PM
Ant exec task JavaForums Java Blogs 0 05-20-2008 02:40 PM
java : how to hide application icon from a task bar yogeshagashe Advanced Java 0 03-12-2008 03:05 PM
Scheduling a task bugger Advanced Java 3 12-04-2007 02:32 PM
Task Blocks 0.5 johnt Java Announcements 0 08-08-2007 10:43 PM


All times are GMT +3. The time now is 08:04 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org