Trying to find out how can we attach a component to a deployed application in ATG.I have MotorpriseJSP demo ATG application deployed in my JBOSS and have created a component named Person in my ATG using control center.
I am not sure how i can attach this Person component to the MotorpriseJSP application deployed in JBOSS so that i can see the code in action.'
any help in this regard will be much appriciated.
Thanks in advance
As long as you have compiled the class and made it part of the assembled EAR file and included the property file that makes Person a Nucleus component, you can either
a) connect ACC to the running instance and start the component manually
b) reference the component in /dyn/admin (try localhost:8080/dyn/admin/NUCLEUS-PATH-OF-PERSON
- that will instantiate it.
That is to instantiate the component inside running Motorprise. You can also refer the component from other running Nucleus component (a.g. add it to Initial.properties) but that will require restart or re-assembly of the MotorpriseJSP
Related
There's the 3rd-party application bpm.ear that contains the ancient commons-net.jar in its /bpm.war/WEB-INF/lib/.
I need to globally override it with my own version of the jar without patching the files inside the deployment. That is, make this change survive undeployment of the app.
Formerly, when we were using JBoss 4x this was solved by setting the $CLASSPATH env. var before starting the server. Of course, this doesn't work in Wildfly 11.
I want to create a custom module inside ${JBOSS_HOME}/modules (already done) and to create a simple rule to implicitly add this module to all apps deployed on this server.
You can use https://wildscribe.github.io/WildFly/16.0/subsystem/ee/#attr-global-modules to define a list of modules that should be made available to all deployments.
We know that during Tomcat startup, it will deploy the .war files of its web applications. My question is after the deployment I need to run a command to modify a file inside WEB-INF/ of the web application which is generated after deployment, and I need to let Tomcat do this automatically for me, is this possible to achieve ? Something like post_run command after deployment.
I found that CustomEventHookListener can probably do this How to run script on Tomcat startup?, but this involves in making a new Java class, and I'm not allowed to do so. I have to figure out way to modify the existing Tomcat configs like server.xml or tomcat.conf in TOMCAT_HOME/conf to do so.
The main issue about not using a Event Hook Listener is that there's no reliable way to tell if the application is ready or not, as Catalina implements it's own lifecycle for each of their components (as seen in https://tomcat.apache.org/tomcat-8.5-doc/api/org/apache/catalina/Lifecycle.html).
Your best shot is to use tail or some external program infer the component's state, but AFAIK there's no way to implement listeners directly in the configuration files.
I am working with Adobe CQ and testing some code that works on one instance and does not on another. The jcr nodes I am testing the same code with are different and I am able to debug only the working instance(my local one). I need to copy the node from failing CQ instance to another using crx/de or any other tool to test both instances with the same data. How can I do this?
You copy repository contents from one instance to other using the package manager
<host>:<port number>/crx/packmgr/index.jsp .
Create a new package with the nodes you want to package as the
filters.
Build the package
download it
Upload it to the required
instance
Install the package
detailed documentation of this feature is available here https://docs.adobe.com/docs/en/cq/5-6-1/administering/package_manager.html
I need to write a folder observer that will run in JBoss. The idea is that as soon as a file will appear in a folder we should handle the file and move it somewhere.
I wrote a simple Java class that will use the Java 7 NIO and it observe the folder. Once a file exists appears in the folder I move it to another folder and process it. Currently what I have done is as soon as the file appears I move it and create a new thread to process it.
Since this suppose to run in JBoss I understand now that creating threads in JBoss is not the way to do that and I should use message queues.
Therefore I am about to change the class and call the queue and pass it an object of the file location and expect the JBoss to handle it.
My question is basically am I doing it right? is this the right way to do that in JBoss? Any process that I want to be done in a multi tasking way should be done with message queues?
Thanks in advance,
Sharon
You shouldn't create un-managed threads in a container. JBoss AS 7 / EAP 6 has the facility to let you define your own thread pools and permit the application container to manage these threads. If you want to use threads to do this, you should use a container managed thread pool. Otherwise, a message passing based implementation would work.
I am not fully sure why this application needs to run in a container/JBoss. Setting that aside, one option is to utilize the message oriented model using JMS queues/topics instead of dealing with files.
The other option is to create a JEE6 timer service that will execute your code to move files at a certain interval. So in this scenario JBoss will manage your threads using the ejb thread pool.
i m new with netbeans platform , i want to use java class's method of module A into module B, so please suggerst to me how can i do deppendacy , Lookup system , and Service provider?
The NetBeans class loading is partitioned, so each module gets its own class-loader.
In order for you to use a class from module A in module B you need to set the package that your class is in as a public package and add Module A as a dependency for Module B
I would suggest looking at this NetBeans platform quick-start tutorial - it covers the Lookup, module interaction and Service Provider usage.
The Netbeans developer FAQ is also very helpful (For example it has a whole section for what the lookup is, and how to interact with it)