Export Classification

2009-07-30 Thread Jennifer Carlucci
Does Restlet have an Export Classification?

Thanks,
Jennifer Carlucci

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376668

RE: Re: Client Android problem...

2009-07-30 Thread webpost
Thanks a lot Thierry.

Et bon courage !

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376642


Re: Export Classification

2009-07-30 Thread Rob Heittman
Just offering an unofficial opinion in case Jerome looks at this and thinks
silly Americans, what do they mean?  I was actually going to suggest you
look to IBM for this info and then I saw your reply address  :-)

Here is what ASF did to document the Export Classification stuff; we could
create a similar page on Restlet Wiki somewhere:

http://www.apache.org/licenses/exports/

The relevant bit is this: Products classified as ECCN 5D002 (crypto and
users of crypto), should follow the TSU exception in EAR
740.139(e)http://www.access.gpo.gov/bis/ear/txt/740.txt,
which applies to software containing or designed for use with encryption
software that is publicly available as open source.

Since this horse has been out of the barn for a long time, maybe the present
administration can make this software-as-a-munition nonsense materially go
away.  Here's hoping.

- Rob

On Wed, Jul 29, 2009 at 1:34 PM, Jennifer Carlucci joff...@us.ibm.comwrote:


 Does Restlet have an Export Classification?

 Thanks,
 Jennifer Carlucci


--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376927

Scalable media server in restlet - HOW TO ?

2009-07-30 Thread Evgeny Shepelyuk
Hello,

I need some advices on building scalable media server with restlet.
The idea is to buld application that serves media to relative big number  
clients (about 500).
The specific features of clients' request are HTTP long-living nature. So  
once connected client permanently fetches content from server.
Because simultaneous number of clients is high the blocking  
thread-per-request model is not appropriate (maybe im wrong ?).

My current approach consist of following steps

1. restlet that returns HTTP OK and custom representaion (extending  
OutputRepresentation)
2. representation has blocking queue inside it and in write() method  
register that queue inside media manager
to be notified about media events that should be streamed to underlying  
client.
3. HTTP connection should not break and be permanent - client should not  
reconnect after it got connected to server.
4. inside write() method of representation i'm performing blocking get  
 from blockign queue to receive event from media manager
that should be written to client's stream.

So now i'm playing with jetty NIO connector paramters and can server about  
200-250 requests but its no less thatn required.
Can anyone give me some advice on designing the project to achieve requred  
scalability ?

PS: I was trying to use Grizzly connector with approach described above  
but it was serving about 10 clients and not more.
Also the Grizzly connector seems not having parameters to configure

PPS: Im using restlet 2.0m3

-- 
Regards,
Evgeny Shepelyuk

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376958


Wrong Resource baseRef when using WadlApplication

2009-07-30 Thread webpost
Hi,

I have a problem concerning wrong resource paths in the WADL output of a 
WadlApplication.

I have a WADL application to which I attach several restlets.

When an OPTIONS request is received, it reaches the router of the WADL 
application. If there is a matching route to a restlet, the request resource 
baseRef gets adapted to the URI of the resource itself (in 
Route.beforeHandle()).
Then in the target restlet handle() method I set the allowed methods and do a 
return.

The further processing is done in WadlApplication.handle(). There, the request 
resource baseRef is still the restlet ressource URI and *not* the base URI of 
the WadlApplication.

This results in wrong ressource URIs in the generated WADL.


When I submit an OPTIONS request that reaches the WadlApplication, but which is 
not routed to any restlet after that (like 
http:[applicationBasePath]/nonExistingPath?method=OPTIONS), the generated 
WADL has the correct URIs.

Any ideas how to fix this?

I thought about adapting the request resource baseRef in the restlet handle() 
method (setting it back to the application baseRef), but that does not seem to 
be a clean solution.

TIA,
Carsten

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376898


Re: RIAP Client from within my J2EE application (jboss)

2009-07-30 Thread Andrew Moore
Thanks, I'll give that a shot and let you know if it works or what I'm still
stuck on.

Regards,

Andrew
-- 
View this message in context: 
http://n2.nabble.com/RIAP-Client-from-within-my-J2EE-application-%28jboss%29-tp3353312p3356788.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2376983


Re: RIAP Client from within my J2EE application (jboss)

2009-07-30 Thread Andrew Moore
I'm definitely still having issues... 

A little more background: we have a quartz job that calls a class which is
trying to make these requests. The Job class I created really has no context
for the my restlet application.  I'm not sure I'm creating my client
correctly... when I create it like this (which seems my only option since I
don't have access to a Context object):

Client riapClient = new Client(Protocol.RIAP);
riapClient.start();

I get a warning message:
WARNING: No available client connector supports the required protocols:
'RIAP' . Please add the JAR of a matching connector to your classpath.

I haven't seen a jar to add (and shouldn't this be part of the basic restlet
jar anyway?). When I try and start my client, a NullPointerException gets
thrown from somewhere inside the start() method. I'm assuming this is
probably due to not having a Context specified. But, I am having a hard time
trying to understand how I can get a Context object from my application. 

I haven't found any example code for instantiating and using an RIAP based
Client. I've seen (and used) RIAP requests from within a ServerResource to
another ServerResource, but not an RIAP request from a Client to the
ServerResource. 

I'm pretty sure I'm missing some sort of concept or using the Client in a
way it wasn't intended perhaps. 

Any help explaining what I'm missing or pointing me to some example code of
an RIAP Client that is sitting on the server-side would be greatly
appreciated! 

Regards,

Andrew
-- 
View this message in context: 
http://n2.nabble.com/RIAP-Client-from-within-my-J2EE-application-%28jboss%29-tp3353312p3357728.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2377064


Re: how to use Guard to protect confirmed URIs

2009-07-30 Thread Fabian Mandelbaum
For all it's worth, I've downloaded Restlet 1.1.5, coded a small test
application with the following createRoot() method:

@Override
public synchronized Restlet createRoot() {
Router router = new Router(getContext());
router.attach(/, RootFolderResource.class);
router.attach(/{fname}.{ext}, RootFolderResource.class);

Router wrouter = new Router(getContext());
wrouter.attach(, WorkspacesResource.class);
wrouter.attach(/{wksp}, WorkspaceResource.class);
Guard wguard = new Guard(getContext(),
ChallengeScheme.HTTP_BASIC, Workspace Authentication - Provide your
credentials);
wguard.getSecrets().put(admi...@enterprise.net,
very_secret.toCharArray());
wguard.setNext(wrouter);
router.attach(/workspaces, wguard);

Router srouter = new Router(getContext());
srouter.attach(/languages, SystemLanguagesResource.class);
srouter.attach(/users, SystemUsersResource.class);
Guard sguard = new Guard(getContext(),
ChallengeScheme.HTTP_BASIC, System Authentication - Provide your
credentials);
sguard.getSecrets().put(ad...@enterprise.net, admin.toCharArray());
sguard.setNext(srouter);
router.attach(/system, sguard);

return router;
}

And it works as expected, I can access the public resources without
credentials, and can access both protected resources (workspaces and
system) providing the correct credentials (hardcoded in the code
above).

So, the problems I'm having seem to be related to Restlet 2.0 snapshot
(both from July 9th and from July 29th). Any help is appreciated.

2009/7/29 Fabián Mandelbaum fmandelb...@gmail.com:
 Hello Thierry, Johnson,

 I've tried a similar strategy as the one described by Thierry, but
 with Restlet 2.0-snapshot (both from 2009-07-09 and last one from
 2009-07-29) and get 404 (HTTP Not Found) errors all over the place.
 The createRoot() method is as follows:

 @Override
    public synchronized Restlet createRoot() {
        Router router = new Router(getContext());
        // Public resources
        router.attach(/, RootFolderResource.class);
        router.attach(/{fname}.{ext}, RootFolderResource.class);
        // Protected resources
        Router wrouter = new Router(getContext());
        wrouter.attach(, WorkspacesResource.class);
        wrouter.attach(/{wksp}, WorkspaceResource.class);
        // Rest of the routes for resources under /workspaces/{wksp} go here
        ChallengeAuthenticator wguard = new
 ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC,
 Workspaces Access - Please supply your credentials);
        wguard.setVerifier(JcrVerifier.getInstance()); // JcrVerifier
 performs a lookup on a JCR repo for user/password
        Authorizer wauthorizer = AclAuthorizer.getInstance(); //
 AclAuthorizer controls access to resources based on URI patterns
        wauthorizer.setNext(wrouter);
        wguard.setNext(wauthorizer);
        router.attach(/workspaces, wguard);
        Router srouter = new Router(getContext());
        srouter.attach(/languages, SystemLanguagesResource.class);
        srouter.attach(/users, SystemUsersResource.class);
                srouter.attach(/users/{user}, SystemUserResource.class);
        srouter.attach(/repository, RepoResource.class);
        ChallengeAuthenticator sguard = new
 ChallengeAuthenticator(getContext(), ChallengeScheme.HTTP_BASIC,
 System Access - Please supply your credentials);
        sguard.setVerifier(JcrVerifier.getInstance());
        Authorizer sauthorizer = AclAuthorizer.getInstance();
        sauthorizer.setNext(srouter);
        sguard.setNext(sauthorizer);
        router.attach(/system, sguard);
        return router;
    }

 I then issue the following request (server is running on localhost, port 
 9000):

 curl http://localhost:9000

 I get the (X)HTML representation of the root resource at /, so far, so good

 now, I issue the following request:

 curl http://localhost:9000/header.jpg | display -

 so far, so good, I get the JPEG image displayed fine. I then go ahead
 and issue the following request:

 curl -i -uad...@enterprise.net:admin http://localhost:9000/workspaces

 instead of getting the list of workspaces, I get a 404 (HTTP not
 found) error. The same happens if I issue requests for any resource
 under /workspaces.

 Now, if I remove srouter and its associated guard and authorizer, all
 requests to /workspaces work fine, I can get to the corresponding
 resources without any problem at all.

 What am I doing wrong?

 As usual, your prompt and accurate answer is appreciated, thanks in advance.

 On Wed, Jul 15, 2009 at 1:25 PM, Thierry
 Boileauthierry.boil...@noelios.com wrote:
 Hello Johnson,

 you can code your routing logic as follow (I mean in the
 Application#createRoot method).
 Router router = new Router(getContext());

 /// Defines the routes, relatively to the root uri /customers)
 Router customerRouter = new Router(getContext());