Skip to main content
grammar nit
Source Link
Dave Moten
  • 12k
  • 2
  • 43
  • 47

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API somehow looks like thatthis:

alt text:)

Update: According to RE: [hibernate-dev] Connection proxying on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of Session#connection() because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API somehow looks like that:

alt text:)

Update: According to RE: [hibernate-dev] Connection proxying on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of Session#connection() because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API somehow looks like this:

alt text:)

Update: According to RE: [hibernate-dev] Connection proxying on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of Session#connection() because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...

added 266 characters in body
Source Link
Pascal Thivent
  • 567.9k
  • 140
  • 1.1k
  • 1.1k

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadocmentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API justsomehow looks like that:

alt text:)

See also

Update: According to RE: [hibernate-dev] Connection proxying on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of Session#connection() because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API just looks like that:

alt text

See also

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API somehow looks like that:

alt text:)

Update: According to RE: [hibernate-dev] Connection proxying on the hibernate-dev list, it seems that the initial intention of the deprecation was to discourage the use of Session#connection() because it was/is considered as a "bad" API, but it was supposed to stay at that time. I guess they changed their mind...

added 150 characters in body
Source Link
Pascal Thivent
  • 567.9k
  • 140
  • 1.1k
  • 1.1k

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API just looks like that:

alt text

See also

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API just looks like that:

alt text

If session.connect() is now deprecated, how am I supposed to do that?

You have to use Session#doWork(Work) and the Work API, as mentioned in the Javadoc:

connection()
     Deprecated. (scheduled for removal in 4.x). Replacement depends on need; for doing direct JDBC stuff use doWork(org.hibernate.jdbc.Work); for opening a 'temporary Session' use (TBD).

You have some time before Hibernate 4.x but, well, using a deprecated API just looks like that:

alt text

See also

Source Link
Pascal Thivent
  • 567.9k
  • 140
  • 1.1k
  • 1.1k
Loading