--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.commons.eclipse</groupId>
+ <version>0.2.1-SNAPSHOT</version>
+ <artifactId>plugins</artifactId>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>org.argeo.eclipse.ui</artifactId>
+ <name>Commons Eclipse UI</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.eclipse.ui</groupId>
+ <artifactId>org.eclipse.ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.eclipse.core</groupId>
+ <artifactId>org.eclipse.core.runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>com.ibm.icu</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>org.springframework.context</artifactId>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.argeo.commons</groupId>
+ <version>0.2.1-SNAPSHOT</version>
+ <artifactId>eclipse</artifactId>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>org.argeo.commons.eclipse</groupId>
+ <artifactId>plugins</artifactId>
+ <name>Commons Eclipse plugins</name>
+ <packaging>pom</packaging>
+ <modules>
+ <module>org.argeo.eclipse.ui</module>
+ </modules>
+ <build>
+ <resources>
+ <resource>
+ <directory>.</directory>
+ <includes>
+ <include>plugin.xml</include>
+ <include>META-INF/**</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <phase>package</phase>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo</groupId>
<developmentCycle>0.2</developmentCycle>
<version.argeo-distribution>1.1.0-SNAPSHOT</version.argeo-distribution>
<version.argeo-ria>0.12.4</version.argeo-ria>
- <version.maven-argeo-osgi>0.1.28</version.maven-argeo-osgi>
+ <version.maven-argeo-osgi>0.1.29-SNAPSHOT</version.maven-argeo-osgi>
<version.maven-bundle-plugin>2.0.1</version.maven-bundle-plugin>
<version.maven-argeo-qooxdoo>1.1.0-SNAPSHOT</version.maven-argeo-qooxdoo>
<site.repoBase>file:///var/argeo/projects/commons/www/site</site.repoBase>
<module>osgi</module>
<module>server</module>
<module>security</module>
+ <module>eclipse</module>
<module>sandbox</module>
</modules>
<build>
public final static String AUTHMODE_UI = "ui";
public final static String AUTHMODE_OS = "os";
public final static String AUTHMODE_DEFAULT = AUTHMODE_OS;
-// private final static String LOGIN_CONFIG_PROPERTY = "java.security.auth.login.config";
+ // private final static String LOGIN_CONFIG_PROPERTY =
+ // "java.security.auth.login.config";
private final static Log log = LogFactory
.getLog(SecuredActiveMqConnectionFactory.class);
uccfa.setTargetConnectionFactory(activeMQSslConnectionFactory);
cachingConnectionFactory = new CachingConnectionFactory();
cachingConnectionFactory.setTargetConnectionFactory(uccfa);
+ cachingConnectionFactory.setCacheConsumers(false);
initConnectionFactoryCredentials(uccfa);
cachingConnectionFactory.initConnection();
authenticationMode = AUTHMODE_DEFAULT;
if (AUTHMODE_OS.equals(authenticationMode)) {
-// if (false) {
-// // Cache previous value of login conf location
-// String oldLoginConfLocation = System
-// .getProperty(LOGIN_CONFIG_PROPERTY);
-// // Find OS family
-// String osName = System.getProperty("os.name");
-// final String auth;
-// if (osName.startsWith("Windows"))
-// auth = "Windows";
-// else if (osName.startsWith("SunOS")
-// || osName.startsWith("Solaris"))
-// auth = "Solaris";
-// else
-// auth = "Unix";
-//
-// Subject subject;
-// // see http://old.nabble.com/osgi-and-jaas-td23485885.html
-// ClassLoader ccl = Thread.currentThread()
-// .getContextClassLoader();
-// try {
-// Thread.currentThread().setContextClassLoader(
-// getClass().getClassLoader());
-// URL url = getClass().getResource(
-// "/org/argeo/security/activemq/osLogin.conf");
-//
-// System.setProperty(LOGIN_CONFIG_PROPERTY, url.toString());
-// LoginContext lc = new LoginContext(auth);
-// lc.login();
-// subject = lc.getSubject();
-// } catch (LoginException le) {
-// throw new ArgeoException("OS authentication failed", le);
-// } finally {
-// if (oldLoginConfLocation != null)
-// System.setProperty(LOGIN_CONFIG_PROPERTY,
-// oldLoginConfLocation);
-// Thread.currentThread().setContextClassLoader(ccl);
-// }
-// // Extract user name
-// String osUsername = null;
-// for (Principal principal : subject.getPrincipals()) {
-// String className = principal.getClass().getName();
-// if ("Unix".equals(auth)
-// && "com.sun.security.auth.UnixPrincipal"
-// .equals(className))
-// osUsername = principal.getName();
-// else if ("Windows".equals(auth)
-// && "com.sun.security.auth.NTUserPrincipal"
-// .equals(className))
-// osUsername = principal.getName();
-// else if ("Solaris".equals(auth)
-// && "com.sun.security.auth.SolarisPrincipal"
-// .equals(className))
-// osUsername = principal.getName();
-// }
-//
-// if (osUsername == null)
-// throw new ArgeoException("Could not find OS user name");
-// }
+ // if (false) {
+ // // Cache previous value of login conf location
+ // String oldLoginConfLocation = System
+ // .getProperty(LOGIN_CONFIG_PROPERTY);
+ // // Find OS family
+ // String osName = System.getProperty("os.name");
+ // final String auth;
+ // if (osName.startsWith("Windows"))
+ // auth = "Windows";
+ // else if (osName.startsWith("SunOS")
+ // || osName.startsWith("Solaris"))
+ // auth = "Solaris";
+ // else
+ // auth = "Unix";
+ //
+ // Subject subject;
+ // // see http://old.nabble.com/osgi-and-jaas-td23485885.html
+ // ClassLoader ccl = Thread.currentThread()
+ // .getContextClassLoader();
+ // try {
+ // Thread.currentThread().setContextClassLoader(
+ // getClass().getClassLoader());
+ // URL url = getClass().getResource(
+ // "/org/argeo/security/activemq/osLogin.conf");
+ //
+ // System.setProperty(LOGIN_CONFIG_PROPERTY, url.toString());
+ // LoginContext lc = new LoginContext(auth);
+ // lc.login();
+ // subject = lc.getSubject();
+ // } catch (LoginException le) {
+ // throw new ArgeoException("OS authentication failed", le);
+ // } finally {
+ // if (oldLoginConfLocation != null)
+ // System.setProperty(LOGIN_CONFIG_PROPERTY,
+ // oldLoginConfLocation);
+ // Thread.currentThread().setContextClassLoader(ccl);
+ // }
+ // // Extract user name
+ // String osUsername = null;
+ // for (Principal principal : subject.getPrincipals()) {
+ // String className = principal.getClass().getName();
+ // if ("Unix".equals(auth)
+ // && "com.sun.security.auth.UnixPrincipal"
+ // .equals(className))
+ // osUsername = principal.getName();
+ // else if ("Windows".equals(auth)
+ // && "com.sun.security.auth.NTUserPrincipal"
+ // .equals(className))
+ // osUsername = principal.getName();
+ // else if ("Solaris".equals(auth)
+ // && "com.sun.security.auth.SolarisPrincipal"
+ // .equals(className))
+ // osUsername = principal.getName();
+ // }
+ //
+ // if (osUsername == null)
+ // throw new ArgeoException("Could not find OS user name");
+ // }
uccfa.setUsername(System.getProperty("user.name"));
uccfa.setPassword(null);
new SecureRandom());
} catch (Exception e) {
throw new ArgeoException(
- "Cannot initailize JMS conneciton factory", e);
+ "Cannot initialize JMS connection factory", e);
}
}