I registered a local utility through generic setup and then updated the __init__ code later. I was surprised to found that the object is not reinitialized when I restart the instance. The utility was just a simple object that subclass the general object class.
How can I make the Utility initialize again ?
**Edit: After see Martijn Pieters's explanation I understand that local utility is always persistent. So how can I delete it and then readd it later ?
Since the comments answered my question already, this is a little sum up so I can close the question:
Local Utilities are always persistent.
(Base on my experience) In Plone 4 uninstalling the product won't remove installed Local Utilities by default (I remembered it once did)
You can user pypi.python.org/pypi/wildcard.fixpersistentutilities/1.1b4 a try for uninstalling Local Utilities.
Thanks Martijn Pieters and vangheem
Related
I am trying to run a silent installation of an application using Installanywhere's silent install and response file functions. I have recorded a response file multiple times, and then run a silent install using that response file, yet certain properties are not used. The target directory always ends up being correct, but things like a passphrase or a server port are completely ignored. I have researched the vendor's boards and found nothing helpful on the topic. Can anyone with Installanywhere experience be of assistance?
If those panels are custom, it is a vendor bug: storing variable to response file is an additional action that should be added to custom panel code
it is possible though to investigate the installer and find out what variable to add to response file
The problem might be that the installer you are using relies on "merge modules". It seems that variable values are not passed to-and-from merge modules when running in silent mode.
I have unfortunately encountered this issue with the installers I'm working on, but the Flexera forums don't provide much help either:
silent installation with merge modules
merge module variable are accessible in silent install
The vendor may not even be aware of this either.
Just put to blank your default value in your "Set installanywhere variable"'s action, Otherwise values from your properties file (for silent install) will be overwrite by values define in action 'Set installAnywhere variable".
As stated in Flexera's documentation, you will need to set the variable both in your proxy's 'setVariable' method, and ReplayService 'register' method.
The 'register' method is responsible on writing the variable to the response file:
customCodePanelProxy.setVariable("MY_VAR", "MY_VALUE");
ReplayVariableService replayService = (ReplayVariableService)customCodePanelProxy.getService(ReplayVariableService.class);
// This will do the trick:
replayService.register("MY_VAR", "MY_VALUE");
For further details refer to this IA guide:
http://helpnet.flexerasoftware.com/InstallAnywhereAPI/IA2010/javadoc/com/zerog/ia/api/pub/ReplayVariableService.html
I have an Alfresco module that I would like to have do some cleanup when a new version of it is installed.
In the current situation, an older version of the module created a folder node with custom properties at the root of the repository. We've since decided to have multiple such nodes, and none of them at that location. I'd like to put into the next version of the module code that would run at Alfresco startup, check for the existence of the old node, copy its properties into the appropriate new nodes, and delete the old node.
Is such a thing possible? I've looked at the Bootstrap configuration file, but that appears to only allow one to add things to the repository, not modify or delete them.
My suggestion is that you write a patch. That is a class that implements
org.alfresco.repo.admin.patch.AbstractPatch
Then you can do pretty much anything you want on bootstrap (except executing searches against solr since it wont be available).
Add some spring configuration, take a look at the file patch-services-context.xml for inspiration.
Yes you can do that, probably you missed the correct place in the documentation about that:
If you open Import Strategy you'll find a section Per BootstrapView, you should be using something like REPLACE_EXISTING or UPDATE_EXISTING for your ACP packaged content (if you're using ACPs as your bootstrap importing strategy).
Here is a more detailed description of the UUID Bindings values.
Hope that helps.
You can use patches.
When alfresco server starts it applies patches and executes database updates etc.
Definition :
A patch is a piece of Java code that executes once when Alfresco
Content Services starts. Custom patches can be implemented.
Documentation Link
I have gone through other questions on SO with no luck for eg:
C++: dlclose doesn't unload the shared library
I have encountered with two shared objects(unfortunately i can't expose the code).
lets say
liba.so and libb.so
liba.so implicitly links libb.so.
And an application explicitly links liba.so using dlopen() with RTLD_LAZY flag.
Everything is working fine except that dlclose() isn't unloading liba.so, although its returning successfully. lsof command is showing both liba.so and libb.so as loaded.
As the answer to above question suggests, dlclose() only decrements ref count. But as nothing else is using those libraries I expect dlclose() to actually unload it.
I have tried these two so's with different application with same problem. So I guess the problem is within the libraries.
Can someone please give suggestion about what might be the cause.
Hmmm... finally it seems that the problem has been found.
That's a bug in OpenSUSE.
Here is the link:
https://bugzilla.novell.com/show_bug.cgi?id=680125
The code is ran on OpenSUSE 12.1 and the bug was resolved in OpenSUSE 12.2.
I have a Sf2 project that I would like to distribute. The project is already usable but should/will be modified as time pass so I am looking for a solution, without reinventing the wheel, to implement an update function inside my application so that people get notified when an update is available and with a one-click procedure can upgrade their deployed version to the newest one.
Do you have any ideas? Is there something similar already around that i can take a look at?
Register here:
https://packagist.org/
and Use composer!
In addition to Adam's answer, also don't forget to register your bundle at knpbundles.com
I need to make so that my application can have only one instance running at a time. Also when it's launched with a command line parameter ( like when registered to open certain file types ) it should pass the parameter to an existing instance and quit immediately without displaying graphical interface. You all probably know what I mean. The framework used is Qt 4, and it seems like it must have some facilities for that. Any ideas?
There is a Qt Solutions project doing this:
Qt Single Application
There are several ways to do inter process communication. Examples can be found in Qt's examples section.
It's also possible to implement a this sort of class oneself using QSharedMemory
(see QSharedMemory::attach() ). It's capable of being used for both determining whether other instance is already running and communicating/sending messages. Except some pointer magic and memory copying it's quite straightforward.