Skip to main content
I.am.Sceiffer
Participating Frequently
October 12, 2020
Question

How to suggest a new feature for ColdFusion 2020 or update for ColdFusion 2018?

  • October 12, 2020
  • 2 replies
  • 378 views

Registering a new REST Service Mapping in my shared Hosting account, I've found a conflict to an existing Mapping in another account (website). This conflict was declared by an error: "access denied ('java.io.FilePermission' 'D:\[website_root]\SubDomains\[api_subDomain_folder]\[REST_service_mapping_folder]' 'read')".

 

My suggestion is making the ColdFusion Admin's REST Service Mapping Registration by application scope, similar as ColdFusion Schedule. As know, You can implement a general schedule or by application scope.

 

So, do you agree to my suggestion?

    This topic has been closed for replies.

    2 replies

    BKBK
    Community Expert
    Community Expert
    October 14, 2020

    Registering a new REST Service Mapping in my shared Hosting account, I've found a conflict to an existing Mapping in another account (website). This conflict was declared by an error: "access denied ('java.io.FilePermission' 'D:\[website_root]\SubDomains\[api_subDomain_folder]\[REST_service_mapping_folder]' 'read')".

     

    Yes, I can imagine that. In REST, the name you choose for your mapping may appear as part of the URL. When you share a Provider your mapping's name might conflict with someone else's URL.

     

    Charlie Arehart
    Community Expert
    Community Expert
    October 13, 2020

    You raise a few things there, I_am_Sceiffer.

     

    First, if I understand you correctly, you're saying you would like a feature to register REST services at the application level rather than in the Admin. Good news there: it's already possible. See the docs on CF REST services and this page in particular, which lists 4 ways to register REST services in CFML, one of which is indeed at the application level. See "Option 4: Registering a REST application using the restInitApplication method".  After checking out that and other resources on it, if you have remaining issues with it, let us know.

     

    Second, you mention getting a "access denied" error, related to 'java.io.FilePermission'. That would suggest that your host is perhaps using the CF "Sandbox Security" feature, to keep apps in one folder from accessing files in some other folder. Of course that's a good thing, for all concerned. 🙂 But I gather it's that you wanted to use a rest service name that conflicted with the same name that pointed to some other.

     

    I haven't tested if the registration of a service in one app, using restinitapplication, will set things up to allow two of the same name to be used in two different apps. If you find out (or if anyone knows), please do let us know here.

     

    Finally, your title was "how to suggest a new feature", and technically one does that at tracker.adobe.com, which lets you create either bug reports or feature requests. But as you see it can be useful to raise it here first, in case some may see and comment on it before you may try to file something at the tracker site. While folks CAN choose to try to watch for new postings there, I don't find it's nearly as common as folks choosing to watch for new discussions here.

    /Charlie (troubleshooter, carehart. org)
    I.am.Sceiffer
    Participating Frequently
    October 14, 2020

    Hi Mr. Arehart!

     

    First of all, thank you so much for your answer! For me, a tiny developer in this world, receiving an answer by you, is one of greatest pleasures I've ever received in my whole life!

     

    Continuing to your mentions. As I know about scheduling, you may register a schedule for your application. It seems that anyone using another application in the same server can register another schedule refered by the same name.

     

    About REST Services registering, as I thought previously, each Service Mapping could be registered for each HOST, when you use restInitApplication with settings struct param (specifically 'useHost' then optionally 'host' variables; if you do not set 'host', ColdFusion assumes the host in cfm page that triggers restInitApplication) after directory and mapping params (using the same restSetting variables' application struct applied at 'this' scope) or generic REST Services whether you do not mention the 'useHost'. If you do not mention 'useHost', the localhost:8500 (considering you set port 8500 for your Admin access) can access each generic REST Service too, then any other web site containig in ColdFusion server.

    After doing some tests, I've concluded that registered REST Services for a HOST can be access by its host only, but its Mapping can't be exclusive for the host it belongs only. If someone would try to register a REST Service for another host, the Admin wouldn't allow, then the error 'java.io.FilePermission' would appear. That's the reason I put a generic title suggesting a new feature.
    The ColdFusion I'm using is 2018 version (that got a lot of errors and unexpected changes after update 4, althought I'm using update 10) and I'm waiting eagerly for 2020 version. Honestly I'm thinking the lastest stable ColdFusion is version 11. After that, I needed to take a lot of workaround solutions to target the necessities I had. I apologize for my honesty, but the new version is comming and I don't know if those errors would persist. One tiny example is not using bracket notation in 'for..in' statement. I needed to change for dot notation. You have to use "for(scope.variable in scope.complex_variable)" instead of "for(scope['variable'] in scope['complex_variable'])". For Lucee, this problem does not exist. Another problem I've found (and posted in this community) is a transaction function trying to use any private function (specifically a getter or setter), both in the same component. To solve this issue, I needed to change getters and setters' visibility to 'package'. The last problem I've found (and posted in this community too) is a conflict between onCFCRequest event handler AND any REST calling. I spent ONE MONTH (fully dedicated) trying to find this error. If I'd have a project to deliver, I would be fired or dismissed by my client. So, I'm asking myself what if $9.500 can be justified for an application server that is bringing more problems that agility... Then 'agility' and 'stability' were slogans created by Jeremy Allaire to present ColdFusion. Some slogans that Macromedia respected while was managing whe product, but Adobe is not doing so.

     

    Once again, thank you so much for your attention and dedication to my post.

    Charlie Arehart
    Community Expert
    Community Expert
    October 14, 2020

    So you're saying that you were already using restinitapplication? If so, sorry. That was not clear from your first post here. 

     

    As for the concerns you express about it, those would indeed be ones to raise in tracker. You could put a link to that here once you do, as some may find it and want to discuss it in either replace.

     

    Same for all the rest of the issues you raise. 

     

    And sorry to hear that you are having so many, and spending so much time solving them, and that you feel that cf11 is the last stable version. I can tell you that I help hundreds of people per year whose experience is otherwise. But I realize that's little consolation when you've suffered problems (and may even have others you know who feel the same way).

     

    As for cf2020 (or cf2021, as I expect it to be), you don't need to wait to see if it solves your problems. Anyone can use its public beta now. Check out these recent posts from me on the above:

     

    https://www.carehart.org/blog/client/index.cfm/2020/10/5/looks_like_cf2020_will_be_cf2021

     

    https://www.carehart.org/blog/client/index.cfm/2020/10/12/getting_started_with_CF2021_public_beta

     

    Finally, thanks for your kind regards at the opening. As always, I just want to help. 🙂 

     

    /Charlie (troubleshooter, carehart. org)