I'm trying to add session clustering in jetty and haven't been succcessfull. tried different article and solutions. Below are my trials. Any help is greatly appreciated
Trial 1
Adding --module=jdbc-sessions in start.ini didn't work. Say a warning that jdbc-sessions is not a valid module
java -jar ../start.jar
WARNING: Cannot enable requested module [jdbc-sessions]: not a valid module name.
Trial 2
Tried adding --add-to-startd while starting jetty. It didn't add jdbc-sessions to start.ini file.
Jetty version:jetty-distribution-9.2.15
JDBC Sessions were not managed by the Jetty Module system until Jetty 9.3. Documentation for how to implement JDBC Sessions in Jetty 9.2 can be found here. If you wanted to you could create your own JDBC module using the templates shown here.
On a side note, I would recommend upgrading your Jetty distribution unless you have a compelling reason to stay with 9.2. Jetty 9.4 has a milestone release out already and a full release is expected in the next month or two.
Related
As part of my project, I need to support legacy JAAS security domain to protect my EJBs. I am following the quickstart (https://github.com/wildfly/quickstart/tree/master/ejb-security-jaas) and updating the configuration using jboss-cli (https://github.com/wildfly/quickstart/blob/master/ejb-security-jaas/configure-elytron-jaas.cli). Everything is working fine with my POC.
But, I am facing an issue when I am trying to apply this concept in production code. We wrap our production code along with WildFly and ask customer to start our product (which internally starts WildFly). As per my understanding, jboss-cli needs WildFly to be running- so, I am trying with the following two approaches
Approach 1
Start WildFly
Run jboss-cli and make all the config related to supporting legacy JAAS security domain
Restart WildFly
This is having lots of challenges including the requirement to restart
Approach 2
Update the standalone.xml (using ant script during my product build time)
Package my production code along with updated standalone.xml and WildFly
Currently, I am following approach 2, but updating standalone.xml with ant script looks inefficient to me. Is there any better approach? Any suggestion from the experts is welcome.
You can do what you want using embed-server. Below is a script I use to add a datasource using jboss-cli. The key parts of this are the embed-server and batch parts:
embed-server --server-config=standalone.xml --std-out=echo
batch
module add --name=org.postgres --resources=${user.home}/Downloads/postgresql-42.2.12.jar --dependencies=javax.api,javax.transaction.api
/subsystem=datasources/jdbc-driver=postgres:add(driver-name="postgres",driver-module-name="org.postgres",driver-class-name=org.postgresql.Driver)
/subsystem=datasources/data-source=blah/:add(connection-url=jdbc:postgresql://localhost:5432/blah,driver-name=postgres,jndi-name=java:/jdbc/blah,initial-pool-size=4,max-pool-size=64,min-pool-size=4,password=blah,user-name=blah)
run-batch
You can see that this is updating standalone.xml. Obviously if you are using a different configuration file you can use it here.
An important part of this is that Wildfly should not be running.
I'd like to deploy the OSS version of artifactory in my existing Tomcat environment. My first try was to simply throw in the two wars that come with the bundled Tomcat. I had to copy over the derby jar, too, so that part seemed to work. I then got blocked by an issue with authentication tokens.
The manual I found is pretty outdated and talks about V2.x only. What I found here was this:
Deployment of my application in existing tomcat
Now - how official is this statement? I didn't find anything on their website saying that it's not supported anymore.
I'd need now
either a helpful resource (for me)
or a link to an official statement (for my management)
Thanks!
Well, I guess this qualifies as an official statement (at https://www.jfrog.com/confluence/display/RTF/Release+Notes#ReleaseNotes-Artifactory4.0)
Tomcat 8 as the Container
JFrog Artifactory 4.0 only supports Tomcat 8 as its container for both RPM and standalone versions. If you are currently using a different container (e.g. Websphere, Weblogic or JBoss), please refer to Upgrading When Using External Servlet Containers for instructions on how to migrate to Tomcat 8.
i'm currently maintaining a struts / spring java webapp running on weblogic 10.3.6 . I use eclipse neon for development, gradle 2.14 and git to do so.
Our customer wants to incorporate weblogic's clustering features so i'm trying to get my head around that.
I managed to set up a cluster with two servers and to deploy the application to it via weblogic administration console.
Now i'm trying to access the cluster in eclipse but it is not visible as a target. I tried restarting weblogic and re-adding the server.
In Oracle's tutorial there is no hint on what else i should configure on either side: http://www.oracle.com/webfolder/technetwork/tutorials/obe/cloud/javaservice/JCS/eclipse_jcs/eclipse_jcs.html#section2
Has any of you seen such behavior ? What else could i do ?
Thanks in advance for any hint !
Somehow, magically, all of a sudden all clusters appeared in eclipse server list... Probably after one or two restarts of weblogic...
I have a Spring Roo app that is deploying to Tomcat with no issues. I'm trying to deploy it to JBoss 6, but I'm finding it impossible to do so.
I've exhausted all resources from Google and I simply receive errors everywhere. Unfortunately, they do not seem specific enough to start narrowing them down to list here.
What can information could I provide to help resolve this situation?
Essentially, I need to know what I need to change from a standard Spring Roo app, using Hibernate and Mysql to work with JBoss 6.
EDIT:
This is the error that I am getting
[ClassLoaderManager] Unexpected error during load of:org.apache.commons.collections.DoubleOrderedMap$1$1: java.lang.IllegalAccessError: class org.apache.commons.collections.DoubleOrderedMap$1$1 cannot access its superclass org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator
Impossible to tell, since you posted no errors.
I'm guessing that it's a problem with the configuration difference between JBOSS and Tomcat.
You set up JDBC data source connection pools differently. Tomcat has the context.xml in the server /conf folder. JBOSS has other XML config files in its server/default/deploy folder. Did you create those correctly?
I assume that you're using JNDI names for injected data sources.
Your JDBC driver JAR for MySQL goes in the Tomcat /lib folder and the JBOSS server/default/deploy/lib folder, not the wAR WEB-INF/lib.
But you should be able to take a WAR with all the Spring Roo stuff, put it into an EAR with jboss-web.xml configuration, and start it up.
We're using Jboss, but we are really only using its JMS stuff. So, is there a way that I can trim down what's loaded when Jboss starts?
You can go for a servlet container (Tomcat) + a JMS provider (ex. ActiveMQ), without using an application server at all.
From 6 years ago, here's a blog entry about configuring JBoss with "just the right stuff."
I haven't used JBoss in a few years, but in v4.0, you could just drop the desired jar files into the deployment directory, and JBoss would load... only those jars.
The correct way to do this, is making a separate profile on your JBoss server that contains only the things needed to use JMS. JBoss v5 comes standard with several profiles: minimal, default, standard, all and web. Each of those starts other services. If you do not specify any profile, you're using the "default" profile.
You can create your own profile starting from a copy of the minimal profile and adding services as needed for JMS support.
The JBoss documentation contains a bit of information on what the files in those profile directories are used for. See Jboss server configurations.
You didn't specify which version of JBoss that you are using. Keep in mind that there are some changes in the configuration between JBoss v4 and JBoss v5/6. The referenced documentation in the answer from Cheeso points to JBoss v4.