New to OSGi and Glassfish. I have an OSGi bundle written that creates a non-serializable manager object that I would like to expose via JNDI so that my web applications can utilize it. (Previously with JBoss I utilized org.jboss.naming.NonSerializableFactory to do this, but I can't seem to find any analogous approach with Glassfish.)
Assuming this can't be done with GF, is there some other way to access this object that is bound in the BundleContext from within my web application?
You can deploy your web application as a bundle and there by access the "non-serializable manager object" as an OSGi service. You can either change the web app to make a bundle or you can convert it into a bundle on the fly using the following commands:
start glassfish
telnet localhost 6666
install webbundle:file:/tmp/foo.war?Web-ContextPath=/foo
start
I don't watch this forum, I watch glassfish forum - you can ask there if you wish.
Related
I am inside a corporate firewall that does not allow me to access the free deployed instance at https://console.gridgain.com/. I downloaded the source and tried to build but again the firewall does not allow me to go outside the network to retrieve the dependencies specified in the pom.xml file.
What are my options
You can download binary build of Ignite Web Console from Apache Ignite, deploy it on premise.
You can also deploy paid version of GridGain, deploy it on premise.
You can download WebConsole from the GridGain website by the following link: https://www.gridgain.com/resources/download
You can install it in your environment and use without needing to access external resources.
I had build a stand alone application on grails 2.1 which uses quart scheduler.
Now I need to deploy this application on Apache tomcat cluster using mod_jk connector.
I am running multiple instance of tomcat and and using Delta Manager for managing the session, but it's not working as I am able to log in the first tomcat instance deployed apps but when I am trying to log into the second instance ,then it won't fetch user information from database and give message that user name or password incorrect.
Even if I stop the first instance, still it won't let me log into the system. I try to find solution online for this problem but didn't get any information on how to deploy grails 2.1 web application on tomcat cluster using mod_jk connector. All the information is available for grails 1.3 version which is pretty old and not relevant for grails 2.1.
Any help would be appreciated.
I have implemented a Push Notification adpater and would like backend system to call the procedure in order to submit notification.
With reference to this post, http://server:port/dev/invoke?adapter=adapterName&procedure=procedureName¶meters=1,2,3 can be used but it works in development environment only.
At the end of the post it is mentioned that http://server:port/context/invoke?adapter=adapterName&procedure=procedureName¶meters=1,2,3 can be used to invoke the adapter.
(1) May I know whether it is supported in production environment only? Because it returned HTTP method GET is not supported by this URL in development environment.
(2) Noted that we might need to define securityTest="wl_unprotected" for the adapter and thus the adapter is not protected. What will be the best way to achieve the goal for backend sytem to call the adapter with security control?
In Worklight 5, Worklight Studio uses Jetty within and the usage of a context root is not required. Only once moving your project to an application server such as Tomcat, WebSphere, Liberty, you have to specify it (in worklight.properties and application-descriptor.xml).
So,
in development - no.
in production - yes.
In Worklight 6 where Jetty has been replaced with Liberty, context root is now part of your project whether you are in development or production.
You will have to add the "wl_unprotected" securityTest to your procedure in the adapter XML.
As for protecting the requests, my guess is that your IT department can isolate and protect specific URLs and not allow using them in certain scenarios. You already have the URL structure for them to use.
I have seen some questions about dynamic adapter configuration at run-time
how to pass domain,port number,username and password from user input to worklight http adapter
With a Worklight Adapter can I change the domain and port for a procedure at runtime?
but my question is about adapter configuration after deploy on WL server 5.0.6 from external - not at runtime from code.
Our scenario is that in our enterprise development and testing process requires the QA and Testing team to change the destination host and port for the adapters from mockup-backend to testing-backend to production-backend regularly during testing.
of course, this should happen through configuration and not re-compile and re-deploy.
Is there a way to change the domain and port values for adapters that are deployed on the WL server 5.0.6?
Can this be changed in the WL database tables?
Can this be changed in the WL server filesystem somewhere?
since we did not find any solution to that yet, the developer team is already thinking about using the Adapter only as dumb facade and implement all connection to the backend-services in Adapter-side Java using the Java URL and Connection classes.
Then it would be easy to read a configuration file from the file system in Java to change the backend destination URL and ports in this file.
It would even be easy to read the URL and port from a property in the worklight.properties file in JavaScript and pass it to Java to connect.
I would like to avoid having developing all backend connection code in Java. I would rather see the project use the actual Adapter connectivity features, but I am also not sure how to convince the team since it is quite easy with just 4 lines of code in Java. The advantage of using the Adapter connectivity that can not be configured is hard to see over a own Java implementation in Adapter-Java code.
Thank you.
Is there a way to change the domain and port values for adapters that are deployed on the WL server 5.0.6? Can this be changed in the WL database tables? Can this be changed in the WL server filesystem somewhere?
In Worklight 5.0.6, as written in the questions you've linked to in the question, an adapter's connectivity settings cannot be altered. They are stored in the packaged adapter and cannot be read from anywhere else during runtime nor after deployment.
I am trying to install Apache Tomcat, but I find to different files:
one is CORE while another is Deployer
which one should I choose?
Download CORE. From the documentation:
the Client Deployer, which is a command shell based script that interacts with the Tomcat Manager but provides additional functionality such as compiling and validating web applications as well as packaging web application into web application resource (WAR) files
The deployer is just a tool. It does not include the Tomcat server.