sure.
This class is the one that starts all threads for processing (this one is
started from a Listener)
---
public class LCMS3 implements ServletContextListener {
private DAO dao = null;
private org.apache.log4j.Logger log = Logger.getLogger(LCMS3.class);
pr
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alexis,
On 1/31/2011 5:23 PM, alexis wrote:
> Sure, find attached 3 files
This list strips attachments.
> This app is intended to do the following (extremely [abridged])
How about a snip of the code that actually loads instantiates the
servlet obje
Sure, find attached 3 files
1. LCMS3, started as Listener.
2. Queue (started from LCMS3 and responsible to start threads connecting to a
device and get information see QueueExec on this class)
3. Parser , responsible to parse and process results obtained from
Queue.QueueExec
This app is inte
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alexis,
On 1/31/2011 4:48 PM, alexis wrote:
> The only difference i found is the class that sets the attribute on
> the servletcontext extends ServletContextListener.
>
> the class that access and reads the context extends HttpServlet and
> shows the
mail.com]
>> Subject: Re: custom class as resource
>
>>LiveInfo li = (LiveInfo) sc.getAttribute("live");
>
>> why im getting a null pointer on the sc.getAttribute line?
>
> Because you never created an attribute named "live" in the ServletContex
{
out.close();
}
}
On Jan 31, 2011, at 4:40 PM, Caldarale, Charles R wrote:
>> From: alexis [mailto:alz...@gmail.com]
>> Subject: Re: custom class as resource
>
>>LiveInfo li = (LiveInfo) sc.getAttribute("live");
>
>> why i
> From: alexis [mailto:alz...@gmail.com]
> Subject: Re: custom class as resource
> LiveInfo li = (LiveInfo) sc.getAttribute("live");
> why im getting a null pointer on the sc.getAttribute line?
Because you never created an attribute named "live" in the
package com.lesi.lcms3.core;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
public class NewClass extends HttpServlet {
private ServletContext sc;
public String aVer()
{
LiveI
2011/1/31 alexis :
> actually im already using a class extending servletcontextlistener, this
> class is the responsible to start all other threads on processing. Some
> threads stores results on a DB, some threads should store results in an
> object to be accesed by a servlet and presented via
actually im already using a class extending servletcontextlistener, this class
is the responsible to start all other threads on processing. Some threads
stores results on a DB, some threads should store results in an object to be
accesed by a servlet and presented via web.
If i use the a) appro
Hi,
On 31 January 2011 00:37, alexis wrote:
> Hello, if i need to share a custom class (that instantiate other clases)
> within my webapp, where multiple threads need to access this class to read
> and write (via synchronized methods), how can achieve this?
It sounds like your class is represe
11 matches
Mail list logo