odbbug/ 000755 000765 000024 00000000000 11766702254 012416 5 ustar 00bjjl staff 000000 000000 odbbug/build/ 000755 000765 000024 00000000000 11766700521 013510 5 ustar 00bjjl staff 000000 000000 odbbug/build.xml 000644 000765 000024 00000007067 11766677113 014256 0 ustar 00bjjl staff 000000 000000
Builds, tests, and runs the project odbbug.
odbbug/dist/ 000755 000765 000024 00000000000 11766700521 013354 5 ustar 00bjjl staff 000000 000000 odbbug/lib/ 000755 000765 000024 00000000000 11766677367 013204 5 ustar 00bjjl staff 000000 000000 odbbug/log/ 000755 000765 000024 00000000000 11766702254 013177 5 ustar 00bjjl staff 000000 000000 odbbug/manifest.mf 000644 000765 000024 00000000122 11766677113 014550 0 ustar 00bjjl staff 000000 000000 Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
odbbug/nbproject/ 000755 000765 000024 00000000000 11766677113 014411 5 ustar 00bjjl staff 000000 000000 odbbug/src/ 000755 000765 000024 00000000000 11766701652 013206 5 ustar 00bjjl staff 000000 000000 odbbug/src/odbbug/ 000755 000765 000024 00000000000 11766677672 014466 5 ustar 00bjjl staff 000000 000000 odbbug/src/odbbug/BaseObject.java 000644 000765 000024 00000000456 11766677617 017336 0 ustar 00bjjl staff 000000 000000 /*
* Copyright (c) 2012 pocketservices GmbH
* $Id: BaseObject.java 759 2012-05-06 10:42:19Z bjjl $
*/
package odbbug;
import javax.persistence.Version;
/**
*
* @author bjjl
*/
public class BaseObject {
@Version
private long version;
public long getVersion() {
return version;
}
}
odbbug/src/odbbug/Odbbug.java 000644 000765 000024 00000002417 11766706063 016522 0 ustar 00bjjl staff 000000 000000 /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package odbbug;
import java.util.logging.Logger;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
/**
*
* @author bjjl
*/
public class Odbbug {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
Person p = new Person("guest");
EntityManagerFactory f = Persistence.createEntityManagerFactory("/tmp/bug.odb");
EntityManager em = f.createEntityManager();
{
EntityTransaction tx = em.getTransaction();
try {
tx.begin();
{
p.setPassword("secret");
em.persist(p);
}
tx.commit();
} finally {
if (tx.isActive()) {
tx.rollback();
}
}
}
{
for (int i = 0; i < 20; i++) {
EntityTransaction tx = em.getTransaction();
try {
tx.begin();
{
p.setPassword("secret" + i);
}
tx.commit();
} finally {
if (tx.isActive()) {
tx.rollback();
}
}
}
}
em.close();
f.close();
}
}
odbbug/src/odbbug/Person.java 000644 000765 000024 00000001314 11766701513 016554 0 ustar 00bjjl staff 000000 000000 /*
* Copyright (c) 2012 pocketservices GmbH
* $Id: Person.java 830 2012-06-02 07:11:34Z bjjl $
*/
package odbbug;
import java.io.Serializable;
import javax.persistence.*;
/**
*
* @author bjjl
*/
@Entity
public class Person extends BaseObject implements Serializable {
@Id
private String nickname;
private String password;
private byte[] salt;
public Person() {
}
public Person(String nickname) {
this.nickname = nickname;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
Security.HashWithSalt hashWithSalt = Security.getHashWithSalt(password);
this.password = hashWithSalt.hash;
this.salt = hashWithSalt.salt;
}
}
odbbug/src/odbbug/Security.java 000644 000765 000024 00000003046 11766677707 017142 0 ustar 00bjjl staff 000000 000000 /*
* Copyright (c) 2012 pocketservices GmbH
* $Id: Security.java 610 2012-01-15 11:34:43Z bjjl $
*/
package odbbug;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Random;
/**
*
* @author bjjl
*/
public class Security {
public static class HashWithSalt {
public String hash;
public byte[] salt;
}
public static HashWithSalt getHashWithSalt(String password) {
return getHashWithSalt(password, null);
}
public static String getHash(String password, byte[] insalt) {
return getHashWithSalt(password, insalt).hash;
}
private static HashWithSalt getHashWithSalt(String password, byte[] insalt) {
HashWithSalt ret = new HashWithSalt();
String hash = "";
byte[] salt;
if (insalt == null) {
Random rand = new Random();
salt = new byte[12];
rand.nextBytes(salt);
} else {
salt = insalt;
}
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.reset();
digest.update(salt);
byte[] s = digest.digest(password.getBytes("UTF-8"));
for (int i = 0; i < 1000; i++) {
digest.reset();
s = digest.digest(s);
}
for (int i = 0; i < s.length; i++) {
hash += Integer.toHexString((0x000000ff & s[i]) | 0xffffff00).substring(6);
}
} catch (UnsupportedEncodingException ex) {
} catch (NoSuchAlgorithmException ex) {
} finally {
ret.hash = hash;
ret.salt = salt;
return ret;
}
}
}
odbbug/nbproject/build-impl.xml 000644 000765 000024 00000155123 11766677113 017200 0 ustar 00bjjl staff 000000 000000
Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar
Must set javac.includes
Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent
Must select some files in the IDE or set javac.includes
To run this application from the command line without Ant, try:
java -cp "${run.classpath.with.dist.jar}" ${main.class}
To run this application from the command line without Ant, try:
java -jar "${dist.jar.resolved}"
Must select one file in the IDE or set run.class
Must select one file in the IDE or set run.class
Must select one file in the IDE or set debug.class
Must select one file in the IDE or set debug.class
Must set fix.includes
Must select one file in the IDE or set profile.class
Must select some files in the IDE or set javac.includes
Some tests failed; see details above.
Must select some files in the IDE or set test.includes
Some tests failed; see details above.
Must select one file in the IDE or set test.class
Must select one file in the IDE or set applet.url
Must select one file in the IDE or set applet.url
odbbug/nbproject/genfiles.properties 000644 000765 000024 00000000723 11766677113 020325 0 ustar 00bjjl staff 000000 000000 build.xml.data.CRC32=91530dfd
build.xml.script.CRC32=ed545b26
build.xml.stylesheet.CRC32=28e38971@1.50.3.46
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=91530dfd
nbproject/build-impl.xml.script.CRC32=efa55897
nbproject/build-impl.xml.stylesheet.CRC32=fcddb364@1.50.3.46
odbbug/nbproject/private/ 000755 000765 000024 00000000000 11766706161 016057 5 ustar 00bjjl staff 000000 000000 odbbug/nbproject/project.properties 000644 000765 000024 00000005141 11766677444 020205 0 ustar 00bjjl staff 000000 000000 annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=
annotation.processing.run.all.processors=true
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
application.title=odbbug
application.vendor=bjjl
build.classes.dir=${build.dir}/classes
build.classes.excludes=**/*.java,**/*.form
# This directory is removed when the project is cleaned:
build.dir=build
build.generated.dir=${build.dir}/generated
build.generated.sources.dir=${build.dir}/generated-sources
# Only compile against the classpath explicitly listed here:
build.sysclasspath=ignore
build.test.classes.dir=${build.dir}/test/classes
build.test.results.dir=${build.dir}/test/results
# Uncomment to specify the preferred debugger connection transport:
#debug.transport=dt_socket
debug.classpath=\
${run.classpath}
debug.test.classpath=\
${run.test.classpath}
# This directory is removed when the project is cleaned:
dist.dir=dist
dist.jar=${dist.dir}/odbbug.jar
dist.javadoc.dir=${dist.dir}/javadoc
endorsed.classpath=
excludes=
file.reference.objectdb-2.4.0_03.jar=lib/objectdb-2.4.0_03.jar
includes=**
jar.archive.disabled=${jnlp.enabled}
jar.compress=false
jar.index=${jnlp.enabled}
javac.classpath=\
${file.reference.objectdb-2.4.0_03.jar}
# Space-separated list of extra javac options
javac.compilerargs=
javac.deprecation=false
javac.processorpath=\
${javac.classpath}
javac.source=1.6
javac.target=1.6
javac.test.classpath=\
${javac.classpath}:\
${build.classes.dir}
javac.test.processorpath=\
${javac.test.classpath}
javadoc.additionalparam=
javadoc.author=false
javadoc.encoding=${source.encoding}
javadoc.noindex=false
javadoc.nonavbar=false
javadoc.notree=false
javadoc.private=false
javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
jnlp.codebase.type=no.codebase
jnlp.descriptor=application
jnlp.enabled=false
jnlp.mixed.code=default
jnlp.offline-allowed=false
jnlp.signed=false
jnlp.signing=
jnlp.signing.alias=
jnlp.signing.keystore=
main.class=odbbug.Odbbug
manifest.file=manifest.mf
meta.inf.dir=${src.dir}/META-INF
mkdist.disabled=false
platform.active=default_platform
run.classpath=\
${javac.classpath}:\
${build.classes.dir}
# Space-separated list of JVM arguments used when running the project
# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value
# or test-sys-prop.name=value to set system properties for unit tests):
run.jvmargs=
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
source.encoding=UTF-8
src.dir=src
test.src.dir=test
odbbug/nbproject/project.xml 000644 000765 000024 00000000763 11766677112 016606 0 ustar 00bjjl staff 000000 000000
org.netbeans.modules.java.j2seproject
odbbug
odbbug/nbproject/private/config.properties 000644 000765 000024 00000000000 11766677444 021443 0 ustar 00bjjl staff 000000 000000 odbbug/nbproject/private/private.properties 000644 000765 000024 00000000231 11766677444 021656 0 ustar 00bjjl staff 000000 000000 compile.on.save=true
do.depend=false
do.jar=true
javac.debug=true
javadoc.preview=true
user.properties.file=/Users/bjjl/.netbeans/7.1.2/build.properties
odbbug/nbproject/private/private.xml 000644 000765 000024 00000000317 11766706161 020254 0 ustar 00bjjl staff 000000 000000
odbbug/log/archive/ 000755 000765 000024 00000000000 11766702254 014620 5 ustar 00bjjl staff 000000 000000 odbbug/log/odb20120615.log 000644 000765 000024 00000025020 11766706107 015267 0 ustar 00bjjl staff 000000 000000 ------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:53:32 #1 store]
Database '/private/tmp/bug.odb' is opened by 33122@MacBook
[2012-06-15 20:53:32 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:53:39 #1 store]
Database '/private/tmp/bug.odb' has been recovered (tr. 1-4)
[2012-06-15 20:53:39 #2 store]
Database '/private/tmp/bug.odb' is opened by 33123@MacBook
[2012-06-15 20:53:39 #3 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:54:08 #1 store]
Database '/private/tmp/bug.odb' is opened by 33126@MacBook
[2012-06-15 20:54:09 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:54:43 #1 store]
Database '/private/tmp/bug.odb' is opened by 33129@MacBook
[2012-06-15 20:54:43 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:54:43 #3 store]
Database '/private/tmp/bug.odb' is closed by 33129@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:56:01 #1 store]
Database '/private/tmp/bug.odb' is opened by 33133@MacBook
[2012-06-15 20:56:01 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:56:10 #1 store]
Database '/private/tmp/bug.odb' is opened by 33135@MacBook
[2012-06-15 20:56:11 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:56:11 #3 store]
Database '/private/tmp/bug.odb' is closed by 33135@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:56:49 #1 store]
Database '/private/tmp/bug.odb' is opened by 33138@MacBook
[2012-06-15 20:56:49 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:56:49 #3 store]
Database '/private/tmp/bug.odb' is closed by 33138@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:57:16 #1 store]
Database '/private/tmp/bug.odb' is opened by 33141@MacBook
[2012-06-15 20:57:16 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:57:16 #3 store]
Database '/private/tmp/bug.odb' is closed by 33141@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:57:49 #1 store]
Database '/private/tmp/bug.odb' is opened by 33144@MacBook
[2012-06-15 20:57:49 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:58:13 #1 store]
Database '/private/tmp/bug.odb' is opened by 33147@MacBook
[2012-06-15 20:58:13 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:58:13 #3 store]
Database '/private/tmp/bug.odb' is closed by 33147@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:58:34 #1 store]
Database '/private/tmp/bug.odb' is opened by 33150@MacBook
[2012-06-15 20:58:34 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:58:34 #3 store]
Database '/private/tmp/bug.odb' is closed by 33150@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:59:35 #1 store]
Database '/private/tmp/bug.odb' is opened by 33152@MacBook
[2012-06-15 20:59:35 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 20:59:43 #1 store]
Database '/private/tmp/bug.odb' is opened by 33154@MacBook
[2012-06-15 20:59:43 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 20:59:43 #3 store]
Database '/private/tmp/bug.odb' is closed by 33154@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:16:54 #1 store]
Database '/private/tmp/bug.odb' is opened by 33183@MacBook
[2012-06-15 21:16:55 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:17:02 #1 store]
Database '/private/tmp/bug.odb' is opened by 33185@MacBook
[2012-06-15 21:17:03 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:17:03 #3 store]
Database '/private/tmp/bug.odb' is closed by 33185@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:17:52 #1 store]
Database '/private/tmp/bug.odb' is opened by 33188@MacBook
[2012-06-15 21:17:52 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:18:02 #1 store]
Database '/private/tmp/bug.odb' is opened by 33190@MacBook
[2012-06-15 21:18:02 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:18:02 #3 store]
Database '/private/tmp/bug.odb' is closed by 33190@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:19:41 #1 store]
Database '/private/tmp/bug.odb' is opened by 33193@MacBook
[2012-06-15 21:19:41 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:19:50 #1 store]
Database '/private/tmp/bug.odb' is opened by 33195@MacBook
[2012-06-15 21:19:50 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:19:50 #3 store]
Database '/private/tmp/bug.odb' is closed by 33195@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:20:32 #1 store]
Database '/private/tmp/bug.odb' is opened by 33198@MacBook
[2012-06-15 21:20:32 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:20:32 #3 store]
Database '/private/tmp/bug.odb' is closed by 33198@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:20:45 #1 store]
Database '/private/tmp/bug.odb' is opened by 33201@MacBook
[2012-06-15 21:20:45 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:20:45 #3 store]
Database '/private/tmp/bug.odb' is closed by 33201@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:21:24 #1 store]
Database '/private/tmp/bug.odb' is opened by 33204@MacBook
[2012-06-15 21:21:24 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:21:24 #3 store]
Database '/private/tmp/bug.odb' is closed by 33204@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:21:35 #1 store]
Database '/private/tmp/bug.odb' is opened by 33207@MacBook
[2012-06-15 21:21:35 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:21:35 #3 store]
Database '/private/tmp/bug.odb' is closed by 33207@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:21:46 #1 store]
Database '/private/tmp/bug.odb' is opened by 33210@MacBook
[2012-06-15 21:21:47 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:21:47 #3 store]
Database '/private/tmp/bug.odb' is closed by 33210@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:21:58 #1 store]
Database '/private/tmp/bug.odb' is opened by 33216@MacBook
[2012-06-15 21:21:58 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:21:58 #3 store]
Database '/private/tmp/bug.odb' is closed by 33216@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:22:05 #1 store]
Database '/private/tmp/bug.odb' is opened by 33219@MacBook
[2012-06-15 21:22:05 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:22:05 #3 store]
Database '/private/tmp/bug.odb' is closed by 33219@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:22:18 #1 store]
Database '/private/tmp/bug.odb' is opened by 33222@MacBook
[2012-06-15 21:22:18 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:22:18 #3 store]
Database '/private/tmp/bug.odb' is closed by 33222@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:22:33 #1 store]
Database '/private/tmp/bug.odb' is opened by 33225@MacBook
[2012-06-15 21:22:33 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:22:33 #3 store]
Database '/private/tmp/bug.odb' is closed by 33225@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:25:46 #1 store]
Database '/private/tmp/bug.odb' is opened by 33230@MacBook
[2012-06-15 21:25:46 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:25:46 #3 store]
Database '/private/tmp/bug.odb' is closed by 33230@MacBook
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:25:53 #1 store]
Database '/private/tmp/bug.odb' is opened by 33232@MacBook
[2012-06-15 21:25:53 #2 type]
Type odbbug.Person is not enhanced.
------------------------------------------------------------------------------------------------------------------------
[2012-06-15 21:25:59 #1 store]
Database '/private/tmp/bug.odb' is opened by 33234@MacBook
[2012-06-15 21:25:59 #2 type]
Type odbbug.Person is not enhanced.
[2012-06-15 21:25:59 #3 store]
Database '/private/tmp/bug.odb' is closed by 33234@MacBook
odbbug/lib/objectdb-2.4.0_03.jar 000644 000765 000024 00005241134 11766677337 016426 0 ustar 00bjjl staff 000000 000000 PK }@ com/objectdb/Activator.classViWU~((uI[+P۲ET:I.0%Ig&jm]Yjmkmr~_N6#pwy_g p_B+DKg1TFҽEtD(xNĘ]8$; -8WDJ!BDj0wa
I q"S1qR K-"ME$Ë9<.2:+a+^|xŅW'q^\p pمTu{Fۂ=F܁ꏪ65}U@y[ۣj4t#S?*È2?13$).sܱ:lD,lEV%S_(dj `@B>ej$=ԞТfM6fuiHE[֦U0}X^#B'(v%v
ooxdC ]Ȋ=ƊN&4Y
4+$RC4qk.\q
eTm#hzeH(:cM|J2Sa#ۊlɤp/l}Dv2FHq=ZLjaDtfGzx%
X(Ԥ^2?fq_@M>TGB{9XS%%Yl֢x2zpLUJf){NPfy ueN\Tgl-N]Xp>^43-7s8[jLY+_pU\oO3E"^YEOTY:s5teyKx]. Gwex#dk}U[?%NFɩc'l#N`vn{閘PҐi$-luL;W)6I
OM5LVr4̴5FlԄEyMkUG_aҕ@i9Tp 5yUiL̄uV'ؒ\bC%?;(0;@viЮUXAkzil#FW4,@8Xנ̘<.J8XQқw JR+iPN-blyTq5w-iU$O"Vyfk Akdž{QDa&>[MN546&EvAP⣉X 0u]u#N^`I`|[-`{p
J{SvHz£ylb{KfAu?NB[uקwvnސsfV)4&>\QNa18USD+#vaL"
IB{V #/k=[l[c/ en}4Sι~':*zJ8MD%9\\T.Q+9KDr*+)PP|I:} IӱPKK;
PK }@ com/objectdb/Doctor.classUN1eW*