Issue Details (XML | Word | Printable)

Key: OPENEJB-898
Type: New Feature New Feature
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Blevins
Reporter: David Blevins
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenEJB

Property overriding for logging configuration

Created: 20/Aug/08 11:58 PM   Updated: 25/Sep/08 08:00 PM
Return to search
Component/s: configuration
Affects Version/s: None
Fix Version/s: 3.1

Time Tracking:
Not Specified

Resolution Date: 25/Sep/08 08:00 PM


 Description  « Hide
    protected void setUp() throws Exception {

        System.setProperty("log4j.category.OpenEJB.security", "debug");

        Properties p = new Properties();
        p.put(Context.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.LocalInitialContextFactory");
        p.put("movieDatabase", "new://Resource?type=DataSource");
        p.put("movieDatabase.JdbcDriver", "org.hsqldb.jdbcDriver");
        p.put("movieDatabase.JdbcUrl", "jdbc:hsqldb:mem:moviedb");

        p.put("movieDatabaseUnmanaged", "new://Resource?type=DataSource");
        p.put("movieDatabaseUnmanaged.JdbcDriver", "org.hsqldb.jdbcDriver");
        p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
        p.put("movieDatabaseUnmanaged.JtaManaged", "false");

        context = new InitialContext(p);
    }



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #687516 Thu Aug 21 00:15:13 UTC 2008 dblevins OPENEJB-898: Property overriding for logging configuration
Also improved the logging for PropertiesLoginModule

OPENEJB-890: Improved classpath configuration searching
Improved the ConfUtils so that it will look for all resources of the requested name, sort them by which is closest to the openejb.base, and then pick the first one. What this does is allow for a more deterministic way to select things like users.properties, groups.properties, login.config, or embedded.logging.properties to be in the classpath severl times (perhaps once per each module being tested) and if the openejb.base is set to the path of the module currently being tested, it's files will always be chosen first.
Files Changed
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/URLs.java
ADD /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/IOUtils.java
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/security/jaas/PropertiesLoginModule.java
ADD /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/UrlComparator.java
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLog.java
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/Log4jLogStreamFactory.java
ADD /openejb/trunk/openejb3/container/openejb-core/src/test/java/org/apache/openejb/util/UrlComparatorTest.java
MODIFY /openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/util/ConfUtils.java