branch feature/1190-encodage-path updated (30ac42d -> 32911a4)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1190-encodage-path in repository lima. See http://git.chorem.org/lima.git from 30ac42d refs #1190 uncomment necessary code new 32911a4 refs #1190 Le mode client serveur est fonctionnel The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 32911a4b3050cde9d5f7a76b4a9cbf6f17f6ca20 Author: dcosse <cosse@codelutin.com> Date: Mon Mar 9 17:55:57 2015 +0100 refs #1190 Le mode client serveur est fonctionnel Summary of changes: .../src/main/java/org/chorem/lima/LimaServer.java | 1 - .../chorem/lima/service/LimaServiceFactory.java | 20 +++++-- lima-swing/pom.xml | 6 -- .../chorem/lima/ui/account/AccountViewHandler.java | 44 +++++++------- lima-swing/src/main/resources/log4j.properties | 6 +- .../java/org/chorem/lima/ui/AbstractLimaTest.java | 1 - lima-web/pom.xml | 32 ---------- lima-web/src/main/assembly/bin.xml | 70 ---------------------- pom.xml | 1 + 9 files changed, 43 insertions(+), 138 deletions(-) delete mode 100644 lima-web/src/main/assembly/bin.xml -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1190-encodage-path in repository lima. See http://git.chorem.org/lima.git commit 32911a4b3050cde9d5f7a76b4a9cbf6f17f6ca20 Author: dcosse <cosse@codelutin.com> Date: Mon Mar 9 17:55:57 2015 +0100 refs #1190 Le mode client serveur est fonctionnel --- .../src/main/java/org/chorem/lima/LimaServer.java | 1 - .../chorem/lima/service/LimaServiceFactory.java | 20 +++++-- lima-swing/pom.xml | 6 -- .../chorem/lima/ui/account/AccountViewHandler.java | 44 +++++++------- lima-swing/src/main/resources/log4j.properties | 6 +- .../java/org/chorem/lima/ui/AbstractLimaTest.java | 1 - lima-web/pom.xml | 32 ---------- lima-web/src/main/assembly/bin.xml | 70 ---------------------- pom.xml | 1 + 9 files changed, 43 insertions(+), 138 deletions(-) diff --git a/lima-business/src/main/java/org/chorem/lima/LimaServer.java b/lima-business/src/main/java/org/chorem/lima/LimaServer.java index bf1d6dd..3df474e 100644 --- a/lima-business/src/main/java/org/chorem/lima/LimaServer.java +++ b/lima-business/src/main/java/org/chorem/lima/LimaServer.java @@ -53,7 +53,6 @@ public class LimaServer { Properties properties = new Properties(); properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, LocalInitialContextFactory.class.getName()); properties.setProperty("openejb.embedded.remotable", "true"); - properties.setProperty("openejb.deployments.classpath.ear", "false"); // Uncomment these properties to change the defaults //properties.setProperty("ejbd.port", "4202"); properties.setProperty("ejbd.bind", "0.0.0.0"); diff --git a/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java b/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java index 5fcaa30..b012514 100644 --- a/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java +++ b/lima-business/src/main/java/org/chorem/lima/service/LimaServiceFactory.java @@ -30,6 +30,8 @@ import org.chorem.lima.business.ServiceMonitorable; import org.nuiton.config.ApplicationConfig; import javax.ejb.embeddable.EJBContainer; +import javax.naming.Context; +import javax.naming.InitialContext; import javax.naming.NamingException; import java.io.IOException; import java.io.InputStream; @@ -54,8 +56,11 @@ public class LimaServiceFactory { /** EJB container. */ protected static EJBContainer container; - /** EJB service namespace. */ - protected static final String NAMESPACE = "java:global/lima/"; + /** Context where to look for bean*/ + protected static Context context; + + /** Suffix to add to interface class name to be able to find out bean. */ + protected static final String EJB_SUFFIX = "Remote"; /** * Init openejb container. @@ -96,7 +101,13 @@ public class LimaServiceFactory { // see http://openejb.apache.org/embedded-configuration.html // http://openejb.apache.org/properties-listing.html // for embedded configuration. - container = EJBContainer.createEJBContainer(props); + try { + context = new InitialContext(props); + } catch (NamingException e) { + if (log.isErrorEnabled()) { + log.error("Can't get context", e); + } + } } public static <M> M getService(Class<M> serviceMonitorableClass) { @@ -164,7 +175,8 @@ public class LimaServiceFactory { serviceName += "Impl"; } try { - ejbHome = container.getContext().lookup(NAMESPACE + serviceName); + // TODO DCossé 09/03/15 necessary as it is done as now but not sure it's good practice. + ejbHome = context.lookup(serviceName + EJB_SUFFIX); } catch (NamingException eee) { throw new RuntimeException( "Can't lookup for service : " + serviceName, eee); diff --git a/lima-swing/pom.xml b/lima-swing/pom.xml index d3e2180..328678a 100644 --- a/lima-swing/pom.xml +++ b/lima-swing/pom.xml @@ -52,12 +52,6 @@ </dependency> <dependency> <groupId>${project.groupId}</groupId> - <artifactId>lima-business</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>${project.groupId}</groupId> <artifactId>lima-web</artifactId> <version>${project.version}</version> <scope>compile</scope> diff --git a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java index 54e3122..1ab2851 100644 --- a/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java +++ b/lima-swing/src/main/java/org/chorem/lima/ui/account/AccountViewHandler.java @@ -347,29 +347,31 @@ public class AccountViewHandler implements ServiceListener { // get selected account int selectedRow = treeTable.getSelectedRow(); TreePath treePath = treeTable.getPathForRow(selectedRow); - TreeTableNode lastPathComponent = (TreeTableNode) treePath.getLastPathComponent(); - Account selectedAccount = (Account)lastPathComponent.getUserObject(); - - // display edit form - final UpdateAccountForm accountForm = new UpdateAccountForm(view); - - InputMap inputMap = accountForm.getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); - ActionMap actionMap = accountForm.getRootPane().getActionMap(); - String binding = "dispose"; - inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), binding); - actionMap.put(binding, new AbstractAction() { - private static final long serialVersionUID = -2123621815991309210L; - - @Override - public void actionPerformed(ActionEvent e) { - accountForm.dispose(); - } - }); + if (treePath != null) { + TreeTableNode lastPathComponent = (TreeTableNode) treePath.getLastPathComponent(); + Account selectedAccount = (Account)lastPathComponent.getUserObject(); + + // display edit form + final UpdateAccountForm accountForm = new UpdateAccountForm(view); + + InputMap inputMap = accountForm.getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT); + ActionMap actionMap = accountForm.getRootPane().getActionMap(); + String binding = "dispose"; + inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), binding); + actionMap.put(binding, new AbstractAction() { + private static final long serialVersionUID = -2123621815991309210L; + + @Override + public void actionPerformed(ActionEvent e) { + accountForm.dispose(); + } + }); - accountForm.setAccount(selectedAccount); - accountForm.setLocationRelativeTo(view); - accountForm.setVisible(true); + accountForm.setAccount(selectedAccount); + accountForm.setLocationRelativeTo(view); + accountForm.setVisible(true); + } } /** diff --git a/lima-swing/src/main/resources/log4j.properties b/lima-swing/src/main/resources/log4j.properties index 0037d9a..4581abe 100644 --- a/lima-swing/src/main/resources/log4j.properties +++ b/lima-swing/src/main/resources/log4j.properties @@ -38,9 +38,9 @@ openejb.logger.external=true log4j.category.OpenEJB.options=warn log4j.category.OpenEJB=warn log4j.category.OpenEJB.server=info -log4j.category.OpenEJB.startup=warn -log4j.category.OpenEJB.startup.service=warn -log4j.category.OpenEJB.startup.config=warn +log4j.category.OpenEJB.startup=info +log4j.category.OpenEJB.startup.service=info +log4j.category.OpenEJB.startup.config=info log4j.category.OpenEJB.hsql=info log4j.category.CORBA-Adapter=info log4j.category.Transaction=warn diff --git a/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java b/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java index 5aef5a8..8a57215 100644 --- a/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java +++ b/lima-swing/src/test/java/org/chorem/lima/ui/AbstractLimaTest.java @@ -1,7 +1,6 @@ /* * #%L * $Id: AbstractLimaTest.java 3929 2014-09-29 16:26:31Z dcosse $ - * $HeadURL: http://svn.chorem.org/lima/trunk/lima-business/src/test/java/org/chorem/lima... $ * %% * Copyright (C) 2011 - 2012 Codelutin, Chatellier Eric * %% diff --git a/lima-web/pom.xml b/lima-web/pom.xml index 847663a..75df248 100644 --- a/lima-web/pom.xml +++ b/lima-web/pom.xml @@ -182,38 +182,6 @@ <profiles> <profile> - <id>assembly-profile</id> - <activation> - <property> - <name>performRelease</name> - <value>true</value> - </property> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <configuration> - <finalName>lima-web-${project.version}</finalName> - <descriptors> - <descriptor>../lima-web/src/main/assembly/bin.xml</descriptor> - </descriptors> - <attach>false</attach> - </configuration> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - - <profile> <id>reporting</id> <activation> <property> diff --git a/lima-web/src/main/assembly/bin.xml b/lima-web/src/main/assembly/bin.xml deleted file mode 100644 index 4091fad..0000000 --- a/lima-web/src/main/assembly/bin.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - #%L - Lima :: Swing - %% - Copyright (C) 2008 - 2010 CodeLutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as - published by the Free Software Foundation, either version 3 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public - License along with this program. If not, see - <http://www.gnu.org/licenses/gpl-3.0.html>. - #L% - --> - -<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> - <id>bin</id> - <formats> - <format>zip</format> - </formats> - - <files> - <file> - <source>target/${project.build.finalName}.${project.packaging}</source> - <destName>lima.${project.packaging}</destName> - </file> - </files> - <fileSets> - <fileSet> - <directory>target/lib</directory> - <outputDirectory>lib</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - <excludes> - <exclude>junit-*.jar</exclude> - </excludes> - </fileSet> - <fileSet> - <includes> - <include>README*</include> - <include>LICENSE*</include> - </includes> - </fileSet> - <fileSet> - <directory>src/main/resources/i18n</directory> - <outputDirectory>i18n</outputDirectory> - <includes> - <include>*.properties</include> - </includes> - </fileSet> - <fileSet> - <directory>target</directory> - <outputDirectory>i18n</outputDirectory> - <includes> - <include>lima-i18n.csv</include> - </includes> - </fileSet> - </fileSets> -</assembly> diff --git a/pom.xml b/pom.xml index 9ad8490..ba7966d 100644 --- a/pom.xml +++ b/pom.xml @@ -163,6 +163,7 @@ <!-- compiler configuration --> <javaVersion>1.7</javaVersion> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!--TODO remove this when IDEA won't ask to change jdk level at each pom modification--> <maven.compiler.source>${javaVersion}</maven.compiler.source> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm