You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Brian Lavender <br...@brie.com> on 2011/06/16 20:00:16 UTC

Why does my DAO need to implement serialization?

It seems that I have to extend the serializable interface for
my DAO in order not to get errors. Should I be putting it
in the WebSession area, or elsewhere?

I have the full context of the sample at the following. It is
a simple Maven project.
http://brie.com/brian/wicket/zebra00.zip


public interface CheeseDAO extends java.io.Serializable {
	public Cheese getCheese(Long id);
	public List<Cheese> getCheeses();
}

public class CheesrSession extends WebSession {
  private CheeseDAO myDAO = new CheeseDAOImpl();

  	public CheeseDAO getDAO() { 
		  return myDAO; 
	}

}


Thanks,

brian
-- 
Brian Lavender
http://www.brie.com/brian/

"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."

Professor C. A. R. Hoare
The 1980 Turing award lecture

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Why does my DAO need to implement serialization?

Posted by jcgarciam <jc...@gmail.com>.
It must be serializable because Wicket session can get serialized.


On Thu, Jun 16, 2011 at 3:00 PM, Brian Lavender [via Apache Wicket] <
ml-node+3603204-29326886-65838@n4.nabble.com> wrote:

> It seems that I have to extend the serializable interface for
> my DAO in order not to get errors. Should I be putting it
> in the WebSession area, or elsewhere?
>
> I have the full context of the sample at the following. It is
> a simple Maven project.
> http://brie.com/brian/wicket/zebra00.zip
>
>
> public interface CheeseDAO extends java.io.Serializable {
>         public Cheese getCheese(Long id);
>         public List<Cheese> getCheeses();
> }
>
> public class CheesrSession extends WebSession {
>   private CheeseDAO myDAO = new CheeseDAOImpl();
>
>   public CheeseDAO getDAO() {
>                   return myDAO;
>         }
>
> }
>
>
> Thanks,
>
> brian
> --
> Brian Lavender
> http://www.brie.com/brian/
>
> "There are two ways of constructing a software design. One way is to
> make it so simple that there are obviously no deficiencies. And the other
> way is to make it so complicated that there are no obvious deficiencies."
>
> Professor C. A. R. Hoare
> The 1980 Turing award lecture
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3603204&i=0>
> For additional commands, e-mail: [hidden email]<http://user/SendEmail.jtp?type=node&node=3603204&i=1>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Why-does-my-DAO-need-to-implement-serialization-tp3603204p3603204.html
>  To start a new topic under Apache Wicket, email
> ml-node+1842946-398011874-65838@n4.nabble.com
> To unsubscribe from Apache Wicket, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1842946&code=amNnYXJjaWFtQGdtYWlsLmNvbXwxODQyOTQ2fDEyNTYxMzc3ODY=>.
>
>



-- 

JC


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Why-does-my-DAO-need-to-implement-serialization-tp3603204p3603224.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Why does my DAO need to implement serialization?

Posted by Igor Vaynberg <ig...@gmail.com>.
https://cwiki.apache.org/confluence/display/WICKET/Spring

-igor

On Thu, Jun 16, 2011 at 12:30 PM, Brian Lavender <br...@brie.com> wrote:
> Where can I find a sample or Javadoc for wicket-ioc?
>
> brian
>
> On Thu, Jun 16, 2011 at 11:11:05AM -0700, Igor Vaynberg wrote:
>> you should inject your dao using one of the provided wicket-ioc
>> modules such as spring or guice. this will create a proxy that is
>> serializable instead of requiring the actual object you are injecting
>> to be serializable.
>>
>> -igor
>>
>>
>> On Thu, Jun 16, 2011 at 11:00 AM, Brian Lavender <br...@brie.com> wrote:
>> > It seems that I have to extend the serializable interface for
>> > my DAO in order not to get errors. Should I be putting it
>> > in the WebSession area, or elsewhere?
>> >
>> > I have the full context of the sample at the following. It is
>> > a simple Maven project.
>> > http://brie.com/brian/wicket/zebra00.zip
>> >
>> >
>> > public interface CheeseDAO extends java.io.Serializable {
>> >        public Cheese getCheese(Long id);
>> >        public List<Cheese> getCheeses();
>> > }
>> >
>> > public class CheesrSession extends WebSession {
>> >  private CheeseDAO myDAO = new CheeseDAOImpl();
>> >
>> >        public CheeseDAO getDAO() {
>> >                  return myDAO;
>> >        }
>> >
>> > }
>> >
>> >
>> > Thanks,
>> >
>> > brian
>> > --
>> > Brian Lavender
>> > http://www.brie.com/brian/
>> >
>> > "There are two ways of constructing a software design. One way is to
>> > make it so simple that there are obviously no deficiencies. And the other
>> > way is to make it so complicated that there are no obvious deficiencies."
>> >
>> > Professor C. A. R. Hoare
>> > The 1980 Turing award lecture
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> --
> Brian Lavender
> http://www.brie.com/brian/
>
> "There are two ways of constructing a software design. One way is to
> make it so simple that there are obviously no deficiencies. And the other
> way is to make it so complicated that there are no obvious deficiencies."
>
> Professor C. A. R. Hoare
> The 1980 Turing award lecture
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Why does my DAO need to implement serialization?

Posted by Martin Grigorov <mg...@apache.org>.
In the chapter about Wicket Spring in WIA

On Thu, Jun 16, 2011 at 10:30 PM, Brian Lavender <br...@brie.com> wrote:
> Where can I find a sample or Javadoc for wicket-ioc?
>
> brian
>
> On Thu, Jun 16, 2011 at 11:11:05AM -0700, Igor Vaynberg wrote:
>> you should inject your dao using one of the provided wicket-ioc
>> modules such as spring or guice. this will create a proxy that is
>> serializable instead of requiring the actual object you are injecting
>> to be serializable.
>>
>> -igor
>>
>>
>> On Thu, Jun 16, 2011 at 11:00 AM, Brian Lavender <br...@brie.com> wrote:
>> > It seems that I have to extend the serializable interface for
>> > my DAO in order not to get errors. Should I be putting it
>> > in the WebSession area, or elsewhere?
>> >
>> > I have the full context of the sample at the following. It is
>> > a simple Maven project.
>> > http://brie.com/brian/wicket/zebra00.zip
>> >
>> >
>> > public interface CheeseDAO extends java.io.Serializable {
>> >        public Cheese getCheese(Long id);
>> >        public List<Cheese> getCheeses();
>> > }
>> >
>> > public class CheesrSession extends WebSession {
>> >  private CheeseDAO myDAO = new CheeseDAOImpl();
>> >
>> >        public CheeseDAO getDAO() {
>> >                  return myDAO;
>> >        }
>> >
>> > }
>> >
>> >
>> > Thanks,
>> >
>> > brian
>> > --
>> > Brian Lavender
>> > http://www.brie.com/brian/
>> >
>> > "There are two ways of constructing a software design. One way is to
>> > make it so simple that there are obviously no deficiencies. And the other
>> > way is to make it so complicated that there are no obvious deficiencies."
>> >
>> > Professor C. A. R. Hoare
>> > The 1980 Turing award lecture
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> > For additional commands, e-mail: users-help@wicket.apache.org
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>
> --
> Brian Lavender
> http://www.brie.com/brian/
>
> "There are two ways of constructing a software design. One way is to
> make it so simple that there are obviously no deficiencies. And the other
> way is to make it so complicated that there are no obvious deficiencies."
>
> Professor C. A. R. Hoare
> The 1980 Turing award lecture
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Why does my DAO need to implement serialization?

Posted by Brian Lavender <br...@brie.com>.
Where can I find a sample or Javadoc for wicket-ioc?

brian

On Thu, Jun 16, 2011 at 11:11:05AM -0700, Igor Vaynberg wrote:
> you should inject your dao using one of the provided wicket-ioc
> modules such as spring or guice. this will create a proxy that is
> serializable instead of requiring the actual object you are injecting
> to be serializable.
> 
> -igor
> 
> 
> On Thu, Jun 16, 2011 at 11:00 AM, Brian Lavender <br...@brie.com> wrote:
> > It seems that I have to extend the serializable interface for
> > my DAO in order not to get errors. Should I be putting it
> > in the WebSession area, or elsewhere?
> >
> > I have the full context of the sample at the following. It is
> > a simple Maven project.
> > http://brie.com/brian/wicket/zebra00.zip
> >
> >
> > public interface CheeseDAO extends java.io.Serializable {
> >        public Cheese getCheese(Long id);
> >        public List<Cheese> getCheeses();
> > }
> >
> > public class CheesrSession extends WebSession {
> >  private CheeseDAO myDAO = new CheeseDAOImpl();
> >
> >        public CheeseDAO getDAO() {
> >                  return myDAO;
> >        }
> >
> > }
> >
> >
> > Thanks,
> >
> > brian
> > --
> > Brian Lavender
> > http://www.brie.com/brian/
> >
> > "There are two ways of constructing a software design. One way is to
> > make it so simple that there are obviously no deficiencies. And the other
> > way is to make it so complicated that there are no obvious deficiencies."
> >
> > Professor C. A. R. Hoare
> > The 1980 Turing award lecture
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

-- 
Brian Lavender
http://www.brie.com/brian/

"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."

Professor C. A. R. Hoare
The 1980 Turing award lecture

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Why does my DAO need to implement serialization?

Posted by Igor Vaynberg <ig...@gmail.com>.
you should inject your dao using one of the provided wicket-ioc
modules such as spring or guice. this will create a proxy that is
serializable instead of requiring the actual object you are injecting
to be serializable.

-igor


On Thu, Jun 16, 2011 at 11:00 AM, Brian Lavender <br...@brie.com> wrote:
> It seems that I have to extend the serializable interface for
> my DAO in order not to get errors. Should I be putting it
> in the WebSession area, or elsewhere?
>
> I have the full context of the sample at the following. It is
> a simple Maven project.
> http://brie.com/brian/wicket/zebra00.zip
>
>
> public interface CheeseDAO extends java.io.Serializable {
>        public Cheese getCheese(Long id);
>        public List<Cheese> getCheeses();
> }
>
> public class CheesrSession extends WebSession {
>  private CheeseDAO myDAO = new CheeseDAOImpl();
>
>        public CheeseDAO getDAO() {
>                  return myDAO;
>        }
>
> }
>
>
> Thanks,
>
> brian
> --
> Brian Lavender
> http://www.brie.com/brian/
>
> "There are two ways of constructing a software design. One way is to
> make it so simple that there are obviously no deficiencies. And the other
> way is to make it so complicated that there are no obvious deficiencies."
>
> Professor C. A. R. Hoare
> The 1980 Turing award lecture
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org