DefaultConnectionIdentifier.jndiName

69 views
Skip to first unread message

Tim Nelson

unread,
Sep 22, 2014, 11:39:45 AM9/22/14
to lif...@googlegroups.com
When I moved `ConnectionIdentifier` to the util package I also changed DefaultConnectionIdentifier.jndiName from a `var` to a `val` not knowing that people where using this to change the jndiName. For more details, see this pr [1].

So, we will be reverting that back to a var for Lift 2.6.

When I sent to the pr for reverting [2], Diego suggested we deprecate this in 2.6 and make the change to val in 3.0. Richard has outlined the steps to migrate code in the pr [1] which was also posted to the wiki [3].

Does anyone have any thoughts on this? Should we go forward with the deprecation and change, or leave it as a var?

Tim

1 - https://github.com/lift/framework/pull/1556

Diego Medina

unread,
Sep 22, 2014, 10:01:31 PM9/22/14
to Lift
+1 to deprecating the var in 2.6 and making it a val in 3.0 , but my vote was probably already implied :)

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

Richard Dallaway

unread,
Sep 23, 2014, 5:48:42 AM9/23/14
to liftweb
How about making the val try a Props.get lookup first before defaulting to "lift"?  That way we could configure the default JNDI name, but get the nice immutability of the val too. 

Would that even work? Perhaps it's just confusing.

Richard
 

Antonio Salazar Cardozo

unread,
Sep 23, 2014, 2:07:24 PM9/23/14
to lif...@googlegroups.com
It sounds like multiple people configure jndiName. I think the steps detailed in the PR are too much work for achieving that
given the fact that it's not an isolated need. I like the idea of using props to configure it if needed.
Thanks,
Antonio


On Tuesday, September 23, 2014 5:48:42 AM UTC-4, Richard Dallaway wrote:
How about making the val try a Props.get lookup first before defaulting to "lift"?  That way we could configure the default JNDI name, but get the nice immutability of the val too. 

Would that even work? Perhaps it's just confusing.

Richard
 
On 23 September 2014 03:01, Diego Medina <di...@fmpwizard.com> wrote:
+1 to deprecating the var in 2.6 and making it a val in 3.0 , but my vote was probably already implied :)
On Mon, Sep 22, 2014 at 11:39 AM, Tim Nelson <tnel...@gmail.com> wrote:
When I moved `ConnectionIdentifier` to the util package I also changed DefaultConnectionIdentifier.jndiName from a `var` to a `val` not knowing that people where using this to change the jndiName. For more details, see this pr [1].

So, we will be reverting that back to a var for Lift 2.6.

When I sent to the pr for reverting [2], Diego suggested we deprecate this in 2.6 and make the change to val in 3.0. Richard has outlined the steps to migrate code in the pr [1] which was also posted to the wiki [3].

Does anyone have any thoughts on this? Should we go forward with the deprecation and change, or leave it as a var?

Tim

1 - https://github.com/lift/framework/pull/1556

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+unsubscribe@googlegroups.com.

Tim Nelson

unread,
Sep 24, 2014, 12:04:46 PM9/24/14
to lif...@googlegroups.com
I agree, that seems like a lot of work.

So, I'll plan on making it a val, but allow configuring via a props entry. Any suggestions for what to call it? default.jndi.name ?


    case object DefaultConnectionIdentifier extends ConnectionIdentifier {
      val jndiName = Props.get("default.jndi.name", "lift")
    }

Tim
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Diego Medina
Lift/Scala consultant
di...@fmpwizard.com
http://fmpwizard.telegr.am

--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code

---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.

Diego Medina

unread,
Sep 24, 2014, 12:57:30 PM9/24/14
to Lift
On Wed, Sep 24, 2014 at 12:04 PM, Tim Nelson <tnel...@gmail.com> wrote:
I agree, that seems like a lot of work.

So, I'll plan on making it a val, but allow configuring via a props entry. Any suggestions for what to call it? default.jndi.name ?


    case object DefaultConnectionIdentifier extends ConnectionIdentifier {
      val jndiName = Props.get("default.jndi.name", "lift")
    }


+1 for that name

Sergey Trofimov

unread,
Nov 20, 2014, 7:18:08 AM11/20/14
to lif...@googlegroups.com
+1

I also hardly need this functionality for production.
Especially, when 3.0-M1 available only for scala 2.10 and 3.0-M2 only for 2.11...

среда, 24 сентября 2014 г., 18:04:46 UTC+2 пользователь Tim Nelson написал:
Reply all
Reply to author
Forward
0 new messages