266 reputation
16
bio website
location
age
visits member for 1 year, 10 months
seen 18 hours ago

[citation needed]


Jun
24
comment Android GPS updates and power management
Your question reads like you're trying to re-invent the entire reason requestLocationUpdates exists. Is your app a background task? Do you figure you'll be able to make efficient use of the battery with requestSingleUpdate() in a loop? Are you sure requestLocationUpdates doesn't do the same thing under the covers?
Jun
10
comment Pooling (Singleton) Objects Against Connection Pools
@MikePartridge - I mean it's outside of my reach from a domain perspective. It's not for a database, it's an ECM. Aside from the domain issue, I simply am not satisfied with the way the ECM responds to pool exhaustion - with catastrophic failure.
Jun
10
comment Pooling (Singleton) Objects Against Connection Pools
@MikePartridge - The same way any other pool handles it: queueing requests. Requests can wait within a specified timeout for a DAO to be available. The difference between that and actually pooling the resource in my case is that I don't have control over the timeout of the resource; hence why I'm trying to throttle it at the DAO level
Jun
9
comment Logic to create common Serverlet3 Login
Probably a better fit for SO
Jun
9
comment Pooling (Singleton) Objects Against Connection Pools
@MikePartridge - My concern is not the object instantiation per se; it's the resource contention that results that worries me. On instantiation, each object will attempt to grab a connection from the pool. Uncurtailed instantiation will result in quick exhaustion of the pool. Pre-instantiating will ensure controlled access to pooled resources
Apr
11
comment Pooling (Singleton) Objects Against Connection Pools
An oversight on my part, sorry about that; It's a multithreaded webservice that connects to a popular ECM. Currently, each request to that service creates a new DAO, which in turn tries to get a new connection. My thinking is that a single DAO (or pool of DAOs), given the fact that there's no mutable state anywhere along the chain of command. What do you think?
Apr
10
awarded  Commentator
Apr
10
comment Pooling (Singleton) Objects Against Connection Pools
The way I read the linked material, these frameworks need to instantiate new context objects because by definition, they are context sensitive and consequently not reusable. The Linq resource also observes most other ORMs are stateless in their data connectivity and management object. The Linq-SQL pattern is not the norm. My example is far from hypothetical and there's no state being manipulated in the DAOs. In the same way a servlet container only ever creates a single instance of a servlet, it should be safe to reuse durable DAOs
Apr
10
revised Pooling (Singleton) Objects Against Connection Pools
added 126 characters in body
Apr
10
asked Pooling (Singleton) Objects Against Connection Pools
Mar
30
comment Where to put variables needed across classes?
+1 for context objects. I tend to preach this myself; in an OOP world, a somewhat mutable stash of context-specific variables is ideal for maintaining loose coupling. Everyone's (in the enterprise space anyway) is doing it
Feb
7
awarded  Citizen Patrol
Feb
4
answered Checking equality of a request parameter
Dec
2
comment Verbose or concise logging
The approach I take is to log steps and critically associated data with that step. For a single process with 3 classes each with a method to act on a given DTO, I log the fact that the process is progressing into and out of the method, and the data that the method in question is acting on or modifying
Dec
2
comment Is securing the credit card data is considered a requirement from the customer
@Ahmedsafan - In that case, it depends on who the customer is. You're right insofar as it's a technical requirement, but if the customer is not an end user but a technical one, they're in the position to require things like PCI-DSS/DA compliance. This will now include the data protection specifications. You're also mixing issues here: first there's talk of securing payment data, then talk of injection; two related but separate concerns. Protecting payment data and protecting system integrity are related, but the customer is (probably) in a position to tell you how to do only one
Dec
2
comment Is securing the credit card data is considered a requirement from the customer
I'm not clear here: You're saying your instructor says that you're supposed to secure the payment data as part of fulfilling user requirements and you disagree that it's not part of the user's requirements?
Sep
11
awarded  Yearling
Jul
6
awarded  Nice Answer
Apr
24
comment Simple questions to test understanding of Dependency Inversion Principle
@blubb, the way I understand it, you dont necessarily need common interfaces to use DI (you can get away with not using an interface). I might have used a stronger example, but in my analogy, a production line for mobile phone chargers is DI context and the mobile phone the DI target. I'll use a better analogy
Apr
24
comment HTML code in Java class
Like it's been said, it depends. Using a servlet to build HTML (to return a page to load an applet for example) is relatively standard practice. But in most other scenarios, templating (either by XSL, XHTML or just baking the HTML into a pseudo properties file) should be the default choice.