The "WCB: Java development" forum contains threads on issues that are related to Java while programming a WCB (WebManager Component Bundle). If you have questions that have impact on Java code, post them in this forum. Some example topics: authorization, the different component types, setting up component dependencies, data access, and so forth.
Not a really big issue, but just a curiosity. We've had to change the WCB ID of one of our WCB's that's being used by a number of people in our organization. This also means that, in order to install it properly, the old WCB (a presentation one) has to be removed.
Is there some way to check for the existence of another WCB, and fail the install if it already exists? Preferably with an error report in the log in the WCB panel, which (iirc) probably means it'd have to be configured in the pom.xml file.
AFAIK there is no way to specify this through a manifest entry. OSGi has a Require-Bundle directive (which should probably be used a little as possible) but you can not negate it. Thus preventing the bundle install wont work.
However you can prevent it from being activated by checking and throwing an exception before initialization from the activator. This will be shown in the console log and you could also go ahead and uninstall it on the fly if you must.
@Override public void init(BundleContext bundleContext, DependencyManager dependencyManager) throws Exception {
if(oldWcbStillInstalled(bundleContext)) throw new Exception("Please uninstall the old WCB first");
This website (Connect.gxsoftware.com) may discuss or contain opinions, (sample) coding, software or other information that does not include GX official interfaces, instructions or guidelines and therefore is not supported by GX. Changes made based on this information are not supported. GX will not be held liable for any damages caused by using or misusing the information, software, instructions, code or methods suggested on this website, and anyone using these methods does so at his/her own risk. GX offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this website, including any liability resulting from incompatibility between the content of this website and the materials and services offered by GX. By using this website you will not hold, or seek to hold, GX responsible or liable with respect to the content of this website.