Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 361071
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T12:32:58+00:00 2026-05-12T12:32:58+00:00

Our application defines a URL scheme whose resolution is context-sensitive: The content of the

  • 0

Our application defines a URL scheme whose resolution is context-sensitive: The content of the URL depends on the state of an in-progress database transaction. As such, to retrieve the content I cannot, for example, open a new database connection. However, I can’t see a way to get at external context from the URLStreamHandler instance.

The documentation is a bit misleading, too: I checked at the java Protocol Handler site and it indicated (in the Implementing URLStreamHandlerFactory section) that the URL class would accept a URLStreamHandlerFactory instance, but the 1.5 JDK indicates that URL accepts only a URLStreamHandler when building a URL.

So, my question is, what is the best way to have context-sensitive URL resolution? Is there any better way than to have a ThreadLocal class variable on my URLStreamHandler implementation, that is set before the calls?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T12:32:58+00:00Added an answer on May 12, 2026 at 12:32 pm

    It turns out that for our purposes, at least, the thread-local context object works best.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our application we are pulling data from a DB2 mainframe database. If the
I have implemented URL mapping in our ASP.NET 4 application, but I have a
Our application has a need to share an existing database table with another locally
Our application is a Java-GWT application that uses Guice-Persist and Guice-Servlet extensively. We have
Our application stores records with shorter texts (strings of 100-1000 characters). It provides search
Our application takes text from a web form and sends it via email to
Our application is a bit slow to load at startup, i'm wandering myself if
Our application downloads data from the internet using RSS but is having connection problems
Our application has a service layer and a DAO layer, written as Spring beans.
Our application currently stores bunch of configuraton & application specific data to files on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.