Raw janabean helps you persist beans, and create beans. Its not a
container, you could create your own cache of course.
Did you know there os also a jpa4jena? It does cache the instances
within a persistence context. I can help u get started
Taylor
Sent from my Windows Phone From: Nikola Milikic
Sent: Sunday, April 17, 2011 8:56 AM
To: jenabean-dev
Subject: Multiple instances of the same resource
Hi all,
Nikola
--
You received this message because you are subscribed to the Google
Groups "jenabean-dev" group.
To post to this group, send email to jenabe...@googlegroups.com.
To unsubscribe from this group, send email to
jenabean-dev...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/jenabean-dev?hl=en.
I think you can use your beans as is, all I did was map JPA
annotations back to the jenbean annotations. I need to review the
project a bit to give a definitive answer, I've been learning .net and
azure this year, and have just now found some time to look back on the
java side.
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((uri == null) ? 0 : uri.hashCode());
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Resource other = (Resource) obj;
if (uri == null) {
if (other.uri != null)
return false;
} else if (!uri.equals(other.uri))
return false;
return true;
}
tws:intelleomodel a ja:MemoryModel ;
tws:package "org.intelleo.services.datacentral";
.
JBProvider p = new JBProvider(DataModelManager.getInstance().getDataModel());
JBFactory f = p.createEntityManagerFactory("tws:intelleomodel", null);
EntityManager em = f.createEntityManager();
Model m = ModelFactory.createDefaultModel();
URL uri = m.getClass().getResource("/jenamodels.n3");
m.read(uri.toString(), "N3");
JBProvider p = new JBProvider(m);