private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-04-30 Thread laxman lingampally
HI all,


please help me.

i am trying to create EMF object  but it is does't created.

private static final EntityManagerFactory emfInstance =
Persistence.createEntityManagerFactory("transactions-optional");



Thanks & Regards
laxman

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-05-02 Thread Steve Moyer
Can you include the code for the class this is in?  You can't do this
in client code, and in server code, you'll need to make sure your
persistence.xml file is found (my most common mistake).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-05-02 Thread laxman lingampally
Hi Steve Moyer.

thinks a lot

i did this code i am putting here please abusarve this code and tell me
where i am did mistake

please help me out asap.


1) Persistence,xml.



Persistence unit for the Envers tutorial of the Hibernate
Getting Started Guide


com.webreg.server.NameData














2) server side code:
pakage name: com.server.dmain.

NameData.java.

@Entity
@Table(name = "NAME")
public class NameData {

public static final EntityManager entityManager() {
return EMF.get().createEntityManager();
}

public NameData persist() {
 try {
EntityManager em =entityManager();
em.persist(this);
}catch(Exception e){
System.out.println("exe:"+e);
}
//setter and getter's
.
}

3) server side code
EMF.java

public final class EMF {
private static final EntityManagerFactory emfInstance =
Persistence.createEntityManagerFactory(" some_name_you_choose");

public static EntityManagerFactory get() {
return emfInstance;
}
private EMF() {
  // nothing

}
}


Thanks & Regards
laxman

On Wed, May 2, 2012 at 6:50 PM, Steve Moyer  wrote:

> Can you include the code for the class this is in?  You can't do this
> in client code, and in server code, you'll need to make sure your
> persistence.xml file is found (my most common mistake).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-05-02 Thread Carlos Alexandro Becker
which error you got?


On Monday, April 30, 2012 10:46:26 AM UTC-3, laxman lingampally wrote:
>
> HI all, 
>
>
> please help me. 
>
> i am trying to create EMF object  but it is does't created. 
>
> private static final EntityManagerFactory emfInstance = 
> Persistence.createEntityManagerFactory("transactions-optional"); 
>
>
>
> Thanks & Regards 
> laxman 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3mt4Sys1xwkJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-05-02 Thread laxman lingampally
Hi carlos,

here EMF object got   null   value.

this object  emfInstance  show's in debug mode null value,  why ??

EntityManagerFactory emfInstance =
Persistence..createEntityManagerFactory("some_name_you_choose");


please tell me asap.

thanks & regards
laxman

On Thu, May 3, 2012 at 8:00 AM, Carlos Alexandro Becker
wrote:

> which error you got?
>
>
> On Monday, April 30, 2012 10:46:26 AM UTC-3, laxman lingampally wrote:
>>
>> HI all,
>>
>>
>> please help me.
>>
>> i am trying to create EMF object  but it is does't created.
>>
>> private static final EntityManagerFactory emfInstance =
>> Persistence.**createEntityManagerFactory("**transactions-optional");
>>
>>
>>
>> Thanks & Regards
>> laxman
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/3mt4Sys1xwkJ.
>
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("transactions-optional");

2012-05-03 Thread Carlos Alexandro Becker
Hmm.. but, without exception?

Please, make sure that your persistence.xml is in META-INF folder inside 
your war folder. JPA implementations usually cannot find the persistence 
unit if it arent inside this folder.


On Thursday, May 3, 2012 1:25:45 AM UTC-3, laxman lingampally wrote:
>
> Hi carlos,
>
> here EMF object got   null   value.
>
> this object  emfInstance  show's in debug mode null value,  why ??
>
> EntityManagerFactory emfInstance = 
> Persistence..createEntityManagerFactory("some_name_you_choose");
>
>
> please tell me asap.
>
> thanks & regards
> laxman
>
> On Thu, May 3, 2012 at 8:00 AM, Carlos Alexandro Becker <
> caarl...@gmail.com> wrote:
>
>> which error you got?
>>
>>
>> On Monday, April 30, 2012 10:46:26 AM UTC-3, laxman lingampally wrote:
>>>
>>> HI all, 
>>>
>>>
>>> please help me. 
>>>
>>> i am trying to create EMF object  but it is does't created. 
>>>
>>> private static final EntityManagerFactory emfInstance = 
>>> Persistence.**createEntityManagerFactory("**transactions-optional"); 
>>>
>>>
>>>
>>> Thanks & Regards 
>>> laxman 
>>>
>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Google Web Toolkit" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/google-web-toolkit/-/3mt4Sys1xwkJ.
>>
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/3Juyn9xQg4AJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.