> Hi Jarek, > > Hmmm .. good question. I've actually been thinking for a while that > the idea of associating a folder to a specific extension was a mistake. Nope we are not , you can have all the extensions you want in a single folder too. for example inside the POJO directory you can have both .classs and .jar file. But when you register you have to add two deployer elements in Axis2.xml > To me that's very "static" thinking and its much more convenient to > allow people to use whatever folder hierarchy they want and just put > their services there, however the service is implemented. > > So my ideal scenario is that we allow /services to contain an > arbitrary directory structure and that in each directory you can have > any kind of deployable artifact (or more directories). I'd like to see > the directory hierarchy become the URL path of the service (at least > for HTTP; other transports can define their own mapping). So if you > have: ' Yes , I recently implemented URL based configurator to support deployer , so you can of course you URL as the directory. Well at the moment it has to be relative URL to the root directory. > > /services > /foo > /bar.aar > /baz/ > services.xml > other stuff > /bar > /a.aar > /b.js > Hmm , the problem with this is how do you associate dynamic directory with a deployer. I mean in the case of foo/baz which is a directory and those kind of stuff can be add a dynamically as well . So I can not understand how we register folder for a directory , of course we can register extensions for a deployer. Because you can scan the directory and then find the corresponding deployer. > etc. then you'd have all the following services: > /foo/bar > /foo/baz > /bar/a > /bar/b > > I think it'll be ok to say that if someone wants to put a .zip file > somewhere and consider that a BPEL service (which is what we (WSO2) do > in the hosting of BPEL/Ode processes as services IIRC). That is, it > should be possible to say that a particular folder (structure) + > extension combination can map to a particular service deployer.
> However that should not be the only way- I'd like the config to say > something like > > extension a ==> deployer b > directory m ==> deployer n > directory x extension y ==> deployer z of course this is very simple thing if you look at the current code. > > And you're allowed to have any number of either kind, but the order > matters: most specific wins first and the later ones win over newer > ones. So if you have a directory+extension combination then only that > extension is supported in that directory. If you have a directory x > specification then only that deployer is on for that directory etc.. I think this is too complex and we are trying to make thing too complicated introducing who going to win and who going to loose, let's keep it simple. I mean that is what I wanted when I introduce the concept of Deployers. :-) > > > Sanjiva. > > Jarek Gawor wrote: >> Hey, >> >> I've been working on this problem and ran into some issues and would >> like to get your comments before committing a fix. The >> RepositoryListener.findServicesInDirectory() scans the "services" >> directory and tries to deploy service modules (.jar or .aar files) >> using ServiceDeployer. But also, when it files files with other >> extensions it tries to deploy them too using a Deployer registered for >> the given extension. For example, if you have the following deployer >> entry in the axis2.xml: >> >> <deployer extension=".svc" directory="widgets" >> >> class="org.apache.axis2.deployment.deployers.CustomDeployer"/> >> >> The CustomDeployer will be used to deploy files with .svc extension in >> the "widgets" directory AND the "services" directory. That's a bit >> weird, IMHO. >> >> So, what I'm proposing is to remove the entire 'else' statement at >> line 303 on RepositoryListener.findServicesInDirectory() so that only >> service modules (.jar or .aar files) can be deployed from within the >> services directory. This solution might break some existing >> deployments where people put non-service module files under the >> services directory but that can be easily fixed by either moving the >> files to the right directory or by adding another deployer entry in >> axis2.xml for the services directory. For example: >> >> <deployer extension=".svc" directory="widgets" >> >> class="org.apache.axis2.deployment.deployers.CustomDeployer"/> >> <deployer extension=".svc" directory="services" >> >> class="org.apache.axis2.deployment.deployers.CustomDeployer"/> >> >> Thoughts? >> >> Jarek >> >> On Tue, Oct 28, 2008 at 5:20 PM, Jarek Gawor <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> Does anyone have comments on >>> https://issues.apache.org/jira/browse/AXIS2-4101? In general, I would >>> like to know if we should allow for multiple deployers to be >>> registered for the same file extension (for any directory). Right now, >>> only one is assumed and that causes problems. >>> >>> Thanks, >>> Jarek >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > -- Thank you! http://blogs.deepal.org --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]