[EJB 3.0] - Quartz Bean deployment
by konstantin.ermakov
Hello!
I wrote a QuartzBean, which I am trying to deploy. The code is as following:
| package mybeans;
|
| import org.jboss.annotation.ejb.ResourceAdapter;
| import org.jboss.logging.Logger;
| import org.quartz.Job;
| import org.quartz.JobExecutionContext;
| import org.quartz.JobExecutionException;
|
| import javax.ejb.MessageDriven;
| import javax.ejb.ActivationConfigProperty;
|
| @MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="cronTrigger", propertyValue="15 0/2 * * * ?")
| })
| @ResourceAdapter("quartz-ra.rar")
| public class QuartzBean implements Job {
|
| private static final Logger log = Logger.getLogger(QuartzBean.class);
|
| public QuartzBean() {
| super();
| System.out.println("Quartz-bean is constructed()");
| }
|
| public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
| System.out.println("Quartz-bean is here!");
| QuartzBean.log.info("************** here in annotated!!!!");
|
| }
|
| }
|
There are no error message after the deployment, and I do see in the log,that the bean was deployed, but the job is not executed. Can somebody help me?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965712#3965712
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965712
19 years, 8 months
[JBoss Seam] - DataModelSelection is null
by neillane
Hi
I am getting a wiered NullPointer Exception when selecting an item from the @DataModelSelection
I Have the following:
anonymous wrote : @DataModel
| private List inboxEnvelopes;
|
| @DataModelSelection
| private Envelope selectedInboxEnvelope;
|
I am cloning the Bookings example and have returned and displayed the objects in a dataTable with an s;link to the method selectItem()
The SelectItem() method runs
envelope = em.merge(inboxEnvelopeSearch.getSelectedInboxEnvelope());
I have set all the @Out to not be required and the @In for the class that performs the database search to return the DataModel List to also be required=false.
@In(required = false)
| private InboxEnvelopeSearch inboxEnvelopeSearch;
Otherwise I get :
anonymous wrote : In attribute requires value for component
Any ideas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965711#3965711
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965711
19 years, 8 months
[JBoss Seam] - Re: @RequestParameter value become null in conversation sfsb
by bfo81
Request parameters usually are only sent once, namely when there is a corresponding parameter in the HTTP request. If there are other requests following with no key parameter, then the variable gets null ;).
So if you want to have that "String key" during the whole conversation, there are two possibilities:
- add (f:param name="key" value="#{yourBean.key}" /) to every commandLink, commandButton, ... on your page, so that it gets always re-injected (BAD IDEA, blows up your page code and it's silly to pass the same parameters from client to server on and on ;))
- copy the key to another property during the conversation's begin:@RequestParameter
| String key;
|
| String keyCopy; //choose a better name ;)
|
| @Begin
| public String beginActionMethod() {
| keyCopy = key;
| ...
| }
|
| public String someOtherActionMethod() {
| doSomethingWith(keyCopy); //key would be null here, so use keyCopy
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965702#3965702
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965702
19 years, 8 months