Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Re: Thread and Process Ids in Aspects

I think you have only one thread in your application or
only thread calling the functions being traced.

From tracing point of view, the current thread is no special 
than any other data you can grab. This leads to your another 
question about logging process ids -- if you can grab 
process ID, sure you can log it. 

(I am not ware of any platform independant way of getting 
process id; you will need to use JNI. Search google for
"process id java" to see possible options).

Hope this helps.

-Ramnivas

--- Olufunmilayo Oluyemi Adepoju <ooa02@xxxxxxxxxxxx> wrote:
> Thanks Ramnivas,
> 
> However I am not fully convinced about the message it gives me. It
> always gives me - "Thread[main, 5, main]", for all applications. The
> api
> of the Thread class defines this method as the thread's reference, so
> am I
> wrong to say this is not necessarily its id - I am really interested
> in whether its thread one or thread two or... that is responsible for
> the pointcut, is that possible? And can this be extended to the
> calling
> process?
> 
> Thanks,
> Funmi.
> 
> On Mon, 4 Aug 2003, Olufunmilayo Oluyemi Adepoju wrote:
> 
> >
> >Hello,
> >
> >I am currently using aspects to log and trace my programs, I would
> like,
> >in addition to the standard information given by the joinpoints, to
> >record the thread and/or process ids responsible for the joinpoints
> in
> >my program. Is this possible in AspectJ?
> >
> >Thanks.
> >
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Back to the top