Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 06-30-2003
salva
 
 
Posts: n/a
basic freeze problem

Hello:

I,m traying make a basic application with evictor, when a link it:

--------------------------------------------------------------------------------------------------------
TiendaWebApplication.o(.gnu.linkonce.t._ZN12Tienda WebApp9runFreezeEiPPcRKN11IceInternal6HandleIN6Fre eze13DBEnvironmentEEE+0x179): In function `TiendaWebApp::runFreeze(int, char**, IceInternal::Handle<Freeze:BEnvironment> const&)':
: undefined reference to `WebServices::TiendaWebI::_adapter'

TiendaWebApplication.o(.gnu.linkonce.t._ZN12Tienda WebApp9runFreezeEiPPcRKN11IceInternal6HandleIN6Fre eze13DBEnvironmentEEE+0x4a7): In function `TiendaWebApp::runFreeze(int, char**, IceInternal::Handle<Freeze:BEnvironment> const&)':
: undefined reference to `WebServices::TiendaWebI::_evictor'
----------------------------------------------------------------------------------------------------------

class TiendaWebI : virtual public TiendaWeb
{
public:
TiendaWebI(const ObjectAdapterPtr& , const DBPtr& , const EvictorPtr& );
virtual ProductViewPrx createProduct(const Ice::Current &);
virtual Products getProducts ( const Ice::Current &) const;
void removeProduct(const Ice::Current &);

static Ice::ObjectAdapterPtr _adapter;
static Freeze:BPtr _db;
static Freeze::EvictorPtr _evictor;
static ProductPersistentMap _objectsMap;
};

-----------------------------------------------------------------------------

TiendaWebApplication virtual int runFreeze(int, char *[],const Freeze:BEnvironmentPtr & dbEnv)
{
Freeze:BPtr db = dbEnv->openDB("tiendaWebFs",true);
// Create an object adapter
TiendaWebI::_adapter=communicator()->createObjectAdapterWithEndpoints("TiendaWebServic e","default -p 10000");
Ice::ObjectFactoryPtr factory = new TiendaWebFactory();
communicator()->addObjectFactory(factory, ProductView::ice_staticId() );
Freeze::PersistenceStrategyPtr strategy= db->createEvictionStrategy();
TiendaWebI::_evictor=db->createEvictor(strategy);
TiendaWebI::_adapter->addServantLocator(TiendaWebI::_evictor,"");
TiendaWebI::_adapter->activate();
communicator()->waitForShutdown();
if(interrupted())
{
cerr<<appName()<<": received signal, shutting down"<<endl;
}
};
-------------------------------------------------------------------------------

thanks, and congratulations for Ice , i'd like pay you when sombody pay me , thanks
Reply With Quote
  #2 (permalink)  
Old 06-30-2003
mes's Avatar
mes mes is offline
ZeroC Staff
 
Name: Mark Spruiell
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Feb 2003
Location: California
Posts: 962
Hi,

Did you remember to define your static members for TiendaWebI?

For example:

Ice::ObjectAdapterPtr TiendaWebI::_adapter;
Freeze::DBPtr TiendaWebI::_db;
Freeze::EvictorPtr TiendaWebI::_evictor;
ProductPersistentMap TiendaWebI::_objectsMap;

If you're still having trouble, it would help us to see more of your code.

Take care,
- Mark
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ip Addresses and basic conection questions EmmanuelOga Help Center 5 07-31-2006 05:45 PM
Visual Basic two-way communication with Java msciarra Help Center 3 12-01-2004 02:33 PM
Freeze problem ruzark Help Center 2 11-15-2004 08:02 PM
Freeze problem freshman Help Center 1 08-18-2004 07:36 AM
Freeze problem xdm Help Center 1 12-15-2003 12:44 PM


All times are GMT -4. The time now is 03:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.