Package javax.jcr

Examples of javax.jcr.Session.logout()


                finalOrder.add(nodes.nextNode().getName());
            }
        } finally {
            session.removeItem("/content");
            session.save();
            session.logout();
        }

        assertThat("Incorrect node order", finalOrder, equalTo(expected));
    }
View Full Code Here


            final Node node = session.getNode(path);
            assertNotNull(node);
            assertEquals("value1", node.getProperty("name1").getString());
            assertEquals("value2", node.getProperty("name2").getString());
        } finally {
            session.logout();
        }
    }

    @Override
    protected void tearDown() throws Exception {
View Full Code Here

                }
            }
            toDelete.clear();
            session.save();
        } finally {
            session.logout();
            resolver.close();
        }
    }
   
    @Test public void test_clone_based_on_anonymous() throws Exception {
View Full Code Here

            } else {
                throw new RuntimeException("Unsupported operation: " + operation);
            }
        } finally {
            if (session != null && session.isLive()) {
                session.logout();
            }
        }
    }

    private Map<String, Object> filterComponentHeaders(Map<String, Object> properties) {
View Full Code Here

        node.setProperty("my.multi.valued", vals);
       
        identifier = node.getIdentifier();

        session.save();
        session.logout();
    }

    @Test
    public void testJcrProducer() throws Exception {
        result.expectedMessageCount(1);
View Full Code Here

        ValueFactory valFact = session.getValueFactory();
        multiValued = new Value[]{valFact.createValue("value-1"),
                valFact.createValue("value-2")};

        session.logout();
    }

    @Test
    public void testJcrNodePathCreation() throws Exception {
        Exchange exchange = createExchangeWithBody("<body/>");
View Full Code Here

            Node node = session.getNodeByIdentifier(uuid);
            assertNotNull(node);
            assertEquals("/home/test/node/with/path", node.getPath());
        } finally {
            if (session != null && session.isLive()) {
                session.logout();
            }
        }
    }

    @Test
View Full Code Here

            assertEquals("/home/test/node/with/path", node.getPath());
            assertTrue(node.getProperty("my.contents.property").isMultiple());
            assertArrayEquals(multiValued, node.getProperty("my.contents.property").getValues());
        } finally {
            if (session != null && session.isLive()) {
                session.logout();
            }
        }
    }

    @Override
View Full Code Here

            } catch (RepositoryException e) {
                log.error("Unable to create index", e);
            } finally {
                if (session != null) {
                    session.logout();
                }
            }
        } else {
            log.info("Cowardly refusing to create indexes on non-Oak instance.");
        }
View Full Code Here

        SessionFactory sf = (SessionFactory) sfControl.getMock();
        MockControl sessionControl = MockControl.createControl(Session.class);
        Session session = (Session) sessionControl.getMock();
      
        sfControl.expectAndReturn(sf.getSession(), session);
        session.logout();
        sessionControl.setVoidCallable(1);
        sfControl.expectAndReturn(sf.getSessionHolder(session), new SessionHolder(session));
        sfControl.replay();
        sessionControl.replay();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.