how to force Entity Manager to contain(attach) entity

I have a huge object(entity) that stores some vertexes and edges on it.I want to store this entity in server to access every time I want. I will make some algorithms on it, So I do not want to load it from database every time. So I want it to be attached to Entity Manager until I detach. Of course I can open another entity , then old entity will be datached from entity manager, newly persisted entity will be detached.

I am using container managed bean. As you know, I could not control transactions over container managed beans.

I have defined a Singeton bean and define this entity as an attribute inside it. As I understand, when I lookup bean every time, a new transaction is started, So entity manager does not contain my entity in persistence context. So entity manager tries to do so many select statements to attach object to persistence context. If I use Hibernate Session, entity is attached to session until I call session.close(). How can I do this using entity manager?

@Singleton
public class BEan implements BEanRemote {
   @PersistenceContext(unitName = "DBService")
   private EntityManager em;
  // ** newly opened entity.*/
   private Entity entity;

}
Posted in Codes & Scripts | Tagged , , | Leave a comment

how to force Entity Manager to contain(attach) entity

I have a huge object(entity) that stores some vertexes and edges on it.I want to store this entity in server to access every time I want. I will make some algorithms on it, So I do not want to load it from database every time. So I want it to be attached to Entity Manager until I detach. Of course I can open another entity , then old entity will be datached from entity manager, newly persisted entity will be detached.

I am using container managed bean. As you know, I could not control transactions over container managed beans.

I have defined a Singeton bean and define this entity as an attribute inside it. As I understand, when I lookup bean every time, a new transaction is started, So entity manager does not contain my entity in persistence context. So entity manager tries to do so many select statements to attach object to persistence context. If I use Hibernate Session, entity is attached to session until I call session.close(). How can I do this using entity manager?

@Singleton
public class BEan implements BEanRemote {
   @PersistenceContext(unitName = "DBService")
   private EntityManager em;
  // ** newly opened entity.*/
   private Entity entity;

}
Posted in Codes & Scripts | Tagged , , , | Leave a comment

Accidentally Stopped Image From Displaying

Hey everyone,

So I pasted a line into this PHP code, then quickly removed it, but somehow messed up the page in the process. The issue is that it no longer displays the primary image: (“certificates-map” style=”width: 980px; height: 700px;”).

Does anyone see what the problem might be and how…

Posted in Codes & Scripts | Tagged , , , , | Leave a comment

Transliteration from English to Kannada

I have 2 Arrays: english[]={“a”, “aa”, “i”, “ii”, . . .}, kannada[]={“\u0043″, “\u0044″, “\u0045″, “\u0046″, . . .} and a Textarea to type. Whenever I type the english[x] in the Textarea the corresponding kannada[x] must appear in the textarea. That is all!
I need a JAVASCRIPT program to…

Posted in Codes & Scripts | Leave a comment

Transliteration from English to Kannada

I have 2 Arrays: english[]={“a”, “aa”, “i”, “ii”, . . .}, kannada[]={“\u0043″, “\u0044″, “\u0045″, “\u0046″, . . .} and a Textarea to type. Whenever I type the english[x] in the Textarea the corresponding kannada[x] must appear in the textarea. That is all!
I need a JAVASCRIPT program to…

Posted in Codes & Scripts | Tagged , , , | Leave a comment