hi Romain . I have tried to modify your example named
rest-example-with-application .

I have deployed it at openshift.

Also i have wirted a Ejb Singleton that scheduled a call to each resource
rest each 6 heures .
For avoid that my  tomee go into sleep . and be responsive all time.


*1) you tink that it work ?*

package mauro.ejb;

import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.Timer;
import javax.ws.rs.core.MediaType;
import org.apache.cxf.jaxrs.client.WebClient;

/**
 *
 * @author utente_javaee7
 */
@Singleton
@Startup
public class MauroSchedulerEjb {


     @Schedule(second = "0", minute = "0", hour = "0,6,12,18,23")
    public void schedulachiamata(Timer timer) {

      //   http://maurojee-sito.rhcloud.com
        String message = WebClient.create("
http://maurotomee17-mauro.rhcloud.com";)
                .path("/openshiftScheduler/rest-prefix/ejb/")
                .accept(MediaType.TEXT_PLAIN)
                .get(String.class);
        if (message != null) {

            System.out.print("\n----------\n");
            System.out.print("ok lo scheduler ha funzionato!!!:\n
risultato= " + message);

            System.out.print("\n----------\n");
        } else {

            System.out.print("\n----------\n");
            System.out.print("lo schedule NON FUNZIONA");

            System.out.print("\n----------\n");
        }
    }

  //  @Schedule(second = "5,25,35,45", minute = "*", hour = "*")
     @Schedule(second = "0", minute = "0", hour = "1,5,11,17,22")
    public void schedulachiamata2(Timer timer) {

        String message = WebClient.create("
http://maurotomee17-mauro.rhcloud.com";)
                .path("/openshiftScheduler/rest-prefix/pojo/")
                .accept(MediaType.TEXT_PLAIN)
                .get(String.class);
        if (message != null) {

            System.out.print("\n----------\n");
            System.out.print("ok lo scheduler ha funzionato!!!:\n
risultato= " + message);
            System.out.print("\n----------\n");
        } else {
            System.out.print("\n----------\n");
            System.out.print("lo schedule NON FUNZIONA");
            System.out.print("\n----------\n");
        }
    }
}

---------------------------
2) for the wadl
link of my 2 resources:




*http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/pojo
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/pojo>http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/ejb
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/ejb>*


*for the wadl*:



*http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/pojo?_wadl
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/pojo?_wadl>**http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/ejb?_wadl
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/ejb?_wadl>*

but with


*http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix?_wadl
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix?_wadl>*



*i get all resources ?<application><grammars/><resources
base="http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/
<http://maurotomee17-mauro.rhcloud.com/openshiftScheduler/rest-prefix/>"><resource
path="/ejb"><method name="GET"><response><representation
mediaType="application/octet-stream"><param name="result" style="plain"
type="xs:string"/></representation></response></method></resource><resource
path="/pojo"><method name="GET"><response><representation
mediaType="application/octet-stream"><param name="result" style="plain"
type="xs:string"/></representation></response></method></resource></resources></application>*

2015-05-06 19:44 GMT+02:00 Romain Manni-Bucau [via TomEE & OpenEJB] <
[email protected]>:

> take rest-example, mvn tomee:run and go on
> http://localhost:8080/rest-example/api/comment?_wadl
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-05-06 19:36 GMT+02:00 mauro2java2011 <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=4674665&i=0>>:
>
> > yes . not workj .
> > A example based on tomee exampl??
> >
> > 2015-05-06 19:30 GMT+02:00 Romain Manni-Bucau [via TomEE & OpenEJB] <
> > [hidden email] <http:///user/SendEmail.jtp?type=node&node=4674665&i=1>>:
>
> >
> > > Hi
> > >
> > > did you try to add "?_wadl" to the url?
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-05-06 19:21 GMT+02:00 mauro2java2011 <[hidden email]
> > > <http:///user/SendEmail.jtp?type=node&node=4674663&i=0>>:
> > >
> > > > i would add the url for a web service REST into my panel of netbeans
> > > >
> > > > How i can get the wadl?
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/how-get-the-url-for-a-wadl-of-a-REST-web-service-tp4674662.html
> > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > >
> > >
> > >
> > > ------------------------------
> > >  If you reply to this email, your message will be added to the
> discussion
> > > below:
> > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/how-get-the-url-for-a-wadl-of-a-REST-web-service-tp4674662p4674663.html
> > >  To unsubscribe from how get the url for a wadl of a REST web
> service.,
> > click
> > > here
> > > <
> > >
> > > .
> > > NAML
> > > <
> >
> http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> > >
> > >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/how-get-the-url-for-a-wadl-of-a-REST-web-service-tp4674662p4674664.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tomee-openejb.979440.n4.nabble.com/how-get-the-url-for-a-wadl-of-a-REST-web-service-tp4674662p4674665.html
>  To unsubscribe from how get the url for a wadl of a REST web service., click
> here
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4674662&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDQ2NzQ2NjJ8LTExMTcxODc2MjU=>
> .
> NAML
> <http://tomee-openejb.979440.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/how-get-the-url-for-a-wadl-of-a-REST-web-service-tp4674662p4674672.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to