You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Lang, Cliff" <cl...@proxicom.com> on 2002/03/05 12:55:30 UTC

Using OMTool -- more information on creating my own PullTools

Is there any examples of the OMTool actually being used?  I haven't
found any, and I can't seem to make it work.   I am trying to use this
to gain knowledge on writing Tools correctly.  The ones I've done seem
to force to much and don't use Factories.
 
Back to OMTool --  using TDK 2.1
>From the JavaDoc, it looks like you can call - or get a reference from
any object in my "om" package in your velocity template.  
So I do :  
#set ($user = $om.TurbineUser)
 
and $user is set to a reference of:
OMTool$PullHelper@xxxxx
 
so I see I got a object - but of what value?  I have tried using the
$user object to call methods of TurbineUser like - $user.getEmail() but
generate a template error.  
How do you set the $om.Whatever()?  I was guessing it would be set to
the current user (if logged in), but not sure how this would happen.
 
As you can see I am a bit confused on how to create PullTools properly,
so any help / examples anyone can provide is much appreciated.
 
Thanks,  Cliff
 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


How does a scheduled job's thread differ?

Posted by Blair Martin <bl...@mindspring.com>.
I've been using Turbine with EJBs successfully for the last few months. But
I recently tried using the scheduler service and am having trouble
connecting to EJBs from the ScheduledJob extension class. I'm wondering
what's different about the job's thread...

In the run(JobEntry job) method I'm using the same code to get a remote
reference to an EJB
that's used everywhere else but an exception is being thrown during name
lookup.

Looking at turbine.log I see something like this:

2002-03-05 12:08:14,754 [Thread-18] ERROR rotation - Error in WorkerThread
for sheduled job #null, task: SendAlerts
java.lang.NullPointerException
 at
com.iona.j2ee.ejb.environment.EnvironmentContext.lookup(EnvironmentContext.j
ava:51)
 at com.iona.j2ee.jndi.url.java.JavaContext.lookup(JavaContext.java:35)
 at com.iona.j2ee.jndi.url.java.JavaContext.lookup(JavaContext.java:51)
 at javax.naming.InitialContext.lookup(Unknown Source)
 at
<snip>

The thing that stands out is the thread name. All other entries in the
log list threads like this: [ORBThreadPool-4::thread-25]. Might this be the
problem? Why does the scheduler service spawn threads differently than the
rest of Turbine?

Thanks in advance for any feedback.


Blair Martin



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Using OMTool -- more information on creating my own PullTools

Posted by Scott Eade <se...@backstagetech.com.au>.
Two things:

1. TurbineUser doesn't really use OM, so OMTool would not be of any use.
2. A long time ago I asked about OMTool and someone replied that it was
broken and was not going to be fixed.  Check the mail archive or await a
more positive response.

I think I looked at TemplateLink when I started writing pull tools.  Again,
the mail archive has some lengthy discussions of pull tools that contain
some good advice.

HTH,

Scott

> From: "Lang, Cliff" <cl...@proxicom.com>
> Reply-To: "Turbine Users List" <tu...@jakarta.apache.org>
> Date: Tue, 5 Mar 2002 06:55:30 -0500
> To: "Turbine Users List" <tu...@jakarta.apache.org>
> Subject: Using OMTool  -- more information on creating my own PullTools
> 
> Is there any examples of the OMTool actually being used?  I haven't
> found any, and I can't seem to make it work.   I am trying to use this
> to gain knowledge on writing Tools correctly.  The ones I've done seem
> to force to much and don't use Factories.
> 
> Back to OMTool --  using TDK 2.1
> From the JavaDoc, it looks like you can call - or get a reference from
> any object in my "om" package in your velocity template.
> So I do :  
> #set ($user = $om.TurbineUser)
> 
> and $user is set to a reference of:
> OMTool$PullHelper@xxxxx
> 
> so I see I got a object - but of what value?  I have tried using the
> $user object to call methods of TurbineUser like - $user.getEmail() but
> generate a template error.
> How do you set the $om.Whatever()?  I was guessing it would be set to
> the current user (if logged in), but not sure how this would happen.
> 
> As you can see I am a bit confused on how to create PullTools properly,
> so any help / examples anyone can provide is much appreciated.
> 
> Thanks,  Cliff
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>