Re: [Neo] Object binding using annotations?

2008-08-15 Thread Jonas Bergvall
As I happen to like annotations I wonder if there is anybody out there
looking into e.g. using JPA annotations to do this, perhaps with some
additional Neo specific annotations? I think Emil and I talked about this
months ago offline.

//Jonas

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Peter Haensgen
Skickat: den 13 augusti 2008 10:49
Till: Neo user discussions
Ämne: Re: [Neo] Object binding using annotations?

Hi,

> has anyone implemented an object binding framework for Neo? I imagine
> sth. that allows to define fields and relationships in POJOs using
> annotations, and binds them using runtime code generation or
reflection.

no, I haven't, but I believe your question could also be read as: How do
I efficiently develop a domain-model for Neo?

Since I don't like annotated code and my special interest is
model-driven software development, I have built a little code generation
system for generating my domain classes. It consists of:

- a simple meta-model (defines things like "Namespace", "Bean",
"Attribute", "Relation", and so on...) built using the Eclipse Modeling
Framework
- some code generation templates based on openArchitectureWare Xpand for
generating bean classes (this is how I call the domain classes) and
factory classes for controlling the beans lifecycle
- some additional classes forming the runtime support for the generated
code

Works great!

(And sorry, no, it's not public yet, as it is still quite
experimental...)

regards,
Peter

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo] Neo4j as a XA source

2008-08-14 Thread Jonas Bergvall
Thanks! 

I guess this is a good topic to put on the wiki.

//Jonas

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Johan Svensson
Skickat: den 14 augusti 2008 18:13
Till: Neo user discussions
Ämne: Re: [Neo] Neo4j as a XA source

On Thu, Aug 14, 2008 at 5:02 PM, Jonas Bergvall <[EMAIL PROTECTED]> wrote:
> Do you have an estimate when that would be?
>

Sometime next week.

> Currently I'm looking into using Neo's TM and injecting XA resources into
it
> instead. Is there any example of how to do that?
>

You need to setup a branch id for the additional XA resource. To do
this wrap your javax.transaction.xa.XAResource in a
org.neo4j.impl.transaction.xaframework.XaConnection. The XaConnections
are created from the
org.neo4j.impl.transaction.xaframework.XaDataSource so you need to
implement that interface too. Then to setup the branch id for the XA
resource:

String dsName = "my_datasource";
String dsClassName = "something.MyXaDataSource";
// some unique byte array
byte[] branchId = // ...
// parameters that can be passed into the MyXaDataSource constructor
Map params = // ...
TxModule txModule = ((EmbeddedNeo) neo).getConfig().getTxModule();
txModule.registerDataSource( dsName, dsClassName, branchId,
params, true );
// Neo TM now knows what branch id to use when the XA resource
gets enlisted in the transaction

A problem with JTA and one of the reasons we have the XaDataSource and
XaConnection interfaces is that the TM must be able to create or
lookup a XA resource during a recovery after a crash by just looking
at a branch/resource id (byte array). From what I know a
specification/standard on how this should be done does not exist.

We really need to extend the configuration possibilities of Neo to
make this easier. Way back before we became "embedded" and IoC
friendly Neo was built like a typical J2EE container. You had a
configuration file where you could add any additional XA resoruce and
it just worked. I could take some time next week to try simplify this
some more (ideal would be to just pass in some additional
configuration in the EmbeddedNeo constructor).

/Johan
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Neo4j as a XA source

2008-08-14 Thread Jonas Bergvall
Do you have an estimate when that would be?

Currently I'm looking into using Neo's TM and injecting XA resources into it
instead. Is there any example of how to do that? 

I know of the Lucene index service doing this, kind of. But Lucene isn't a
normal XA resource so there is a lot of wrapping around it that is hard to
get a grip on fast.

//Jonas

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Johan Svensson
Skickat: den 14 augusti 2008 16:52
Till: Neo user discussions
Ämne: Re: [Neo] Neo4j as a XA source

Hi Jonas,

What needs to be done is to inject the TransactionManager for Neo to
use. This would not be that hard to achieve but there may be some
minor issues to get it working. I am currently busy with the b7
release of Neo but could take a look at this when b7 has been
released.

-Johan

On Thu, Aug 14, 2008 at 12:34 PM, Jonas Bergvall <[EMAIL PROTECTED]> wrote:
> Hi all,
>
>
>
> Has anybody an example of how to configure Atomikos or JOTM to use Neo as
a
> XA source (in Spring). The scenario is to use Neo in parallel with an old
> JDBC DB.
>
>
>
> //Jonas
>
>
>
> Chief Architect
>
> FlexToll AB
>
>  <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
>
> M: +46 (0) 708 - 94 67 67
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] Neo4j as a XA source

2008-08-14 Thread Jonas Bergvall
Hi all,

 

Has anybody an example of how to configure Atomikos or JOTM to use Neo as a
XA source (in Spring). The scenario is to use Neo in parallel with an old
JDBC DB.

 

//Jonas

 

Chief Architect

FlexToll AB

  [EMAIL PROTECTED]

M: +46 (0) 708 - 94 67 67

 

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


SV: SV: [Neo] Crash course in Maven+Neo

2008-04-28 Thread Jonas Bergvall
Thanks for the link!

//Jonas

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Anders Nawroth
Skickat: den 28 april 2008 16:02
Till: Neo user discussions
Ämne: Re: SV: [Neo] Crash course in Maven+Neo

hi!

Jonas Bergvall skrev:
> I recommend reading "Better Builds With Maven", a free book about Maven 2
> with a good quick start. Google for it. 
>   

http://www.exist.com/?q=node/151

Version is 1.5.1. - March 2008.

/anders


> The latest version of the is 1.3.1 I think, but unfortunately the company
> hosting the original PDF has been purchased and the old link doesn't work
> any more (http://www.devzuz.com/web/guest/products/resources#BBWM).
>
> //Jonas
>
> -Ursprungligt meddelande-
> Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
För
> Philip Jägenstedt
> Skickat: den 28 april 2008 15:21
> Till: user@lists.neo4j.org
> Ämne: [Neo] Crash course in Maven+Neo
>
> I think it would be a good idea to provide an example pom.xml on the
> wiki which gets the neo dependecies and shows how to include those
> with packaging.
>
> I'm trying to figure out how to build a project and then run it, a not
> so easy task in the jungle that is
>
http://maven.apache.org/guides/introduction/introduction-to-dependency-mecha
> nism.html
> and http://maven.apache.org/plugins/maven-dependency-plugin/howto.html
>
> Here's my pom.xml:
>
> 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";>
>   4.0.0
>   org.foolip.mushup
>   mushup
>   jar
>   0.1
>   mushup
>   http://mushup.foolip.org
>   
> 
>   
> org.apache.maven.plugins
> maven-compiler-plugin
> 2.0.2
> 
>   1.5
>   1.5
>   
>   
> 
>   
>   
> 
>   neo4j-public-repository
>   http://m2.neo4j.org
> 
>   
>   
> 
>   junit
>   junit
>   3.8.1
>   test
> 
> 
>   org.neo4j
>   neo
>   1.0-b6
>   provided
> 
> 
> org.neo4j
> index-util
> 0.3-SNAPSHOT
>   provided
> 
>   
> 
>
> I sort of guessed scope provided on the neo deps, but that didn't do
> anything. What is the proper way to build something and have it
> installed (whatever that means, I just want it in a folder so I can
> run it I guess) with dependencies? My brainz are exploding!
>
> Philip
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>   
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


SV: [Neo] Crash course in Maven+Neo

2008-04-28 Thread Jonas Bergvall
I recommend reading "Better Builds With Maven", a free book about Maven 2
with a good quick start. Google for it. 

The latest version of the is 1.3.1 I think, but unfortunately the company
hosting the original PDF has been purchased and the old link doesn't work
any more (http://www.devzuz.com/web/guest/products/resources#BBWM).

//Jonas

-Ursprungligt meddelande-
Från: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] För
Philip Jägenstedt
Skickat: den 28 april 2008 15:21
Till: user@lists.neo4j.org
Ämne: [Neo] Crash course in Maven+Neo

I think it would be a good idea to provide an example pom.xml on the
wiki which gets the neo dependecies and shows how to include those
with packaging.

I'm trying to figure out how to build a project and then run it, a not
so easy task in the jungle that is
http://maven.apache.org/guides/introduction/introduction-to-dependency-mecha
nism.html
and http://maven.apache.org/plugins/maven-dependency-plugin/howto.html

Here's my pom.xml:

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";>
  4.0.0
  org.foolip.mushup
  mushup
  jar
  0.1
  mushup
  http://mushup.foolip.org
  

  
org.apache.maven.plugins
maven-compiler-plugin
2.0.2

  1.5
  1.5

  

  
  

  neo4j-public-repository
  http://m2.neo4j.org

  
  

  junit
  junit
  3.8.1
  test


  org.neo4j
  neo
  1.0-b6
  provided


org.neo4j
index-util
0.3-SNAPSHOT
  provided

  


I sort of guessed scope provided on the neo deps, but that didn't do
anything. What is the proper way to build something and have it
installed (whatever that means, I just want it in a folder so I can
run it I guess) with dependencies? My brainz are exploding!

Philip
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] (no subject)

2008-03-14 Thread Jonas Bergvall
Hi all!

 

I regularly get this exception below, caused by the final delete() in the
following code snippet (part of a linked list implemented using Neo)

 

Relationship lastItemRel = rootNode.getSingleRelationship(relType,
Direction.INCOMING);

if (lastItemRel != null) {

lastItem = lastItemRel.getStartNode();

lastItemRel.delete();

}

 

org.neo4j.impl.nioneo.store.StoreFailureException: Record[17562] not in use

at
org.neo4j.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.ja
va:173)

at
org.neo4j.impl.nioneo.store.RelationshipStore.getRecord(RelationshipStore.ja
va:105)

at
org.neo4j.impl.nioneo.xa.NeoTransaction.relDelete(NeoTransaction.java:507)

at
org.neo4j.impl.nioneo.xa.NeoStoreXaConnection$RelationshipEventConsumerImpl.
deleteRelationship(NeoStoreXaConnection.java:257)

at
org.neo4j.impl.nioneo.xa.NioNeoDbPersistenceSource$NioNeoDbResourceConnectio
n.relDelete(NioNeoDbPersistenceSource.java:163)

at
org.neo4j.impl.persistence.PersistenceManager.relDelete(PersistenceManager.j
ava:131)

at org.neo4j.impl.core.NodeManager.deleteRelationship(NodeManager.java:908)

at org.neo4j.impl.core.RelationshipImpl.delete(RelationshipImpl.java:177)

at org.neo4j.impl.core.RelationshipProxy.delete(RelationshipProxy.java:41)

 

I'm pretty sure this isn't a threading problem. So my question is, what can
be causing this? Does the stacktrace say anything to someone?

 

Cheers,

Jonas

___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


RE: [Neo] JTA dependency in Maven failing

2008-01-09 Thread Jonas Bergvall
Thanks! That resolved the issue. What was the change? 

//Jonas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emil Eifrem
Sent: den 9 januari 2008 11:59
To: Neo user discussions
Subject: Re: [Neo] JTA dependency in Maven failing

On 1/9/08, Jonas Bergvall <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> When rebuilding my project on a clean machine I get an error saying it 
> can't find the JTA version 1.0.1 dependency.
> In http://repo1.maven.org/maven2/javax/transaction/jta/ I only find 
> "1.0.1B", but Neo requires "1.0.1". But it looks like it's been this 
> way for some time.
> Any idea why I get this problem?

Hmm, we just did some backend changes on the repo. I might have fixed it now 
tho. Can you try again?

Cheers,

--
Emil Eifrém, CEO [EMAIL PROTECTED] Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808 
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo] JTA dependency in Maven failing

2008-01-09 Thread Jonas Bergvall
Hi all, 
 
When rebuilding my project on a clean machine I get an error saying it
can't find the JTA version 1.0.1 dependency.
In http://repo1.maven.org/maven2/javax/transaction/jta/ I only find
"1.0.1B", but Neo requires "1.0.1". But it looks like it's been this way
for some time.
Any idea why I get this problem?
 
//Jonas
___
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


RE: [Neo] [ticket] #24: Fix multiple Neo instances in the same JVM

2007-11-21 Thread Jonas Bergvall
Good. I was actually thinking of this yesterday, in order to partition data and 
hence minimize/simplify data replication. But then, I haven'¨t looked into 
replication of a Neo instance so I might be off.

//Jonas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of neo4j.org
Sent: den 22 november 2007 01:33
Cc: user@lists.neo4j.org
Subject: [Neo] [ticket] #24: Fix multiple Neo instances in the same JVM

#24: Fix multiple Neo instances in the same JVM
-+--
-+
 Reporter:  emil |   Owner:  johans 
 Type:  enhancement request  |  Status:  new
 Priority:  major|   Milestone:  neo-1.0
Component:  neo-core impl|Keywords: 
-+--
-+
 People keep asking for the option of running multiple Neo instances in the  
same JVM. To me, that's a theoretical-borderlining-hypothetical use case.
 But there's no good reason of disallowing that and it solves other  problems. 
So let's un-singleton-ify the core and make multiple  simultaneous Neo 
instances in the same VM possible.

--
Ticket URL: 
neo4j.org 
The Neo4J.org Issue Tracker
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


RE: [Neo] Re: [ticket] #21: Neo holds on to transaction log file after shutdown

2007-11-21 Thread Jonas Bergvall
That solved the problem. Great!

//Jonas 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of neo4j.org
Sent: den 21 november 2007 20:46
Cc: user@lists.neo4j.org
Subject: [Neo] Re: [ticket] #21: Neo holds on to transaction log file
after shutdown

#21: Neo holds on to transaction log file after shutdown
---+
---+
 Reporter:  tobias |Owner:  johans  
 Type:  bug report |   Status:  assigned
 Priority:  major  |Milestone:  
Component:  neo-core impl  |   Resolution:  
 Keywords: |  
---+
---+
Changes (by johans):

  * status:  new => assigned

Comment:

 Found a bug in transaction module that didn't close a file channel to
current transaction log when stopped. Fixed by [552]. Can you update
your  pom to use "rc1-SNAPSHOT" and see if it solves the problem?

--
Ticket URL: 
neo4j.org 
The Neo4J.org Issue Tracker
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


RE: [Neo] Neo 1.0b6 released under GNU Affero General Public License

2007-11-20 Thread Jonas Bergvall
Great news! Congratulations!

And Trinity is already adopted to the new release. :)

//Jonas 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Emil Eifrem
Sent: den 20 november 2007 05:19
To: Neo user discussions
Subject: [Neo] Neo 1.0b6 released under GNU Affero General Public License

Ladies and gentlemen,

It is my honor and distinct pleasure to announce that the last beta of the 1.0 
version of Neo has been released under GNU Affero General Public License, which 
was finalized by the Free Software Foundation a couple of hours ago. (I think 
this will make Neo the first software ever to be licensed under AGPLv3!)

Release 1.0-b6 contains a number of improvements over b5. Most notably:

   o RelationshipTypes are now completely dynamic. This means that there's no 
need to register them with EmbeddedNeo at startup anymore, nor to register them 
later. Just use them and if it's the first time Neo sees them, they will be 
transparently created in the underlying store. For more information, see the 
javadocs for RelationshipType.
   o This impacts the APIs in EmbeddedNeo. Most of the APIs have been kept for 
backwards compatibility but marked deprecated. They will be removed in the next 
release. Furthermore, EmbeddedNeo now implements a NeoService interface, which 
is the proper way to pass it around. The deprecated relationship type 
operations in EmbeddedNeo have NOT been migrated to NeoService.
   o The shell has been improved in a number of areas, including support for 
easy evaluation of Groovy scripts, auto-reconnect, bash-style configuration of 
the prompt, etc.
   o We now have full support for array properties for all primitives and 
Strings.
   o Lots of performance tweaks and improvements in the Neo core. This has 
resulted in a minor upgrade of the layout of the stores. 1.0-b6 will 
transparently upgrade older versions, but new stores won't run with older 
versions. Be sure to backup before you upgrade.
   o A lot of testing and robustification on Windows.
   o In addition, a number of minor convenience methods have been added to the 
API. See CHANGES.txt for more info.

The API (javadocs) has been improved quite a lot, though we expect to iterate 
even more on it before 1.0 final. We'll be working more over the next couple of 
weeks on documentation (API docs, Design Guide, tutorial, etc).

The binary and source release is available at:

   http://neo4j.org/download

and under the "1.0-b6" version tag if you're using Maven2.

Hack away!

Cheers,

--
Emil Eifrém, CEO [EMAIL PROTECTED] Neo Technology, www.neotechnology.com
Cell: +46 733 462 271 | US: 206 403 8808 
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user


RE: [Neo] Re: [ticket] #19: Read only transactions

2007-11-08 Thread Jonas Bergvall
What we are looking for is if Neo can detect the issue and log it. 

In Spring's hibernate template classes this read-only flag is used to
optimize things (no flush to db). But for hibernate it also causes and
an exception if any write operations are performed (see
http://forum.springframework.org/showthread.php?t=20304 for an example).

I guess the issue can be ignored for now if Neo won't take advantage of
the flag.

Tobias and I reacted on this as it looked like the transaction was
rollbacked, but I can't reproduced that today. And from what I
understand the transaction shouldn't rollback either.

//Jonas

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of neo4j.org
Sent: den 6 november 2007 18:14
Cc: user@lists.neo4j.org
Subject: [Neo] Re: [ticket] #19: Read only transactions

#19: Read only transactions
-+--
-+
 Reporter:  tobias   |Owner:  johans
 Type:  enhancement request  |   Status:  new   
 Priority:  major|Milestone:
Component:  other|   Resolution:
 Keywords:   |  
-+--
-+
Comment (by johans):

 Exactly how does these "warnings" work in Spring? Ex. Spring using some
other supported JTA implementation, what would happen when a write
operation takes place? Would an exception be thrown right away or upon
commit? Or is there some other way the user is notified?

 If the user is notified upon commit and this works with other JTA TMs I
think spring just registers a transaction synchronization that on before
completion checks if transaction is read only, if not (and user said
this  should be a read only transaction) the transaction is marked
rollback only  and the user notified.

--
Ticket URL: 
neo4j.org 
The Neo4J.org Issue Tracker
___
Neo mailing list
User@lists.neo4j.org
http://lists.neo4j.org/mailman/listinfo/user