Hi,
How to start jira (its tomcat to be precise) with custom conf/context.xml?
Long story:
In my testing environment i need to start two JIRAs. The problem is that, each JIRA lease the same session cookie file because its base urls are:
So acording to https://confluence.atlassian.com/jirakb/user-is-constantly-logged-out-of-jira-192872663.html i decided to try to change session cookie file name. I want to set custom session cookie file name for each instance. I am using tomcat8 right now. As far as i know to change this session cookie file name i need to set in <Context> element of my web application (JIRA in my case). So i did it manually and it works perfect. Here is my context.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<Context sessionCookieName="JIRA2990SESSIONID">
<Resource name="jdbc/JiraDS" type="javax.sql.DataSource" auth="Container" driverClassName="org.postgresql.Driver" factory="org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory" password="xxxxxxx" url="jdbc:postgresql://localhost:5432/jira2990" username="jira2990"/>
<Resource name="UserTransaction" type="javax.transaction.UserTransaction" auth="Container" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
</Context>
How to configure my pom.xml to tell maven-jira-plugin/maven-amps-plugin to start jira with my custom context.xml?
I figured out it uses cargo-maven2-plugin under the hood but can i add/modify its configuration? How to do it?
I haven't experimented with a custom context.xml but there is another workaround you can try. You can use different context paths.
"--context-path /jira1" will set the context path of your first JIRA instances to http://localhost:2990/jira1 and so on. That should fix the session issue.
Check out https://developer.atlassian.com/server/framework/atlassian-sdk/atlas-run/ for the available options for atlas-run.
I already figured it out, but anyway, thanks Jobin!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.