Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
>> If I call the >> server more than once it generates the exception: >> >> visad.TypeException: ScalarType: name already used >> >> at this line >> >> RealType X=new RealType("X",null,null); > > Great to hear you're making such good progress. You can solve > your problem like this: > > RealType X = RealType.getRealTypeByName("X"); > if (X == null) X = new RealType("X",null,null); An alternative solution (though probably not the one you want to use) is: RealType X; try { X = new RealType("X",null,null); } catch (TypeException e) { X = RealType.getRealTypeByName("X"); } Bill's solution is probably better for a server, since his code assumes the variable already exists (which sounds like the more common case for your application)
visad
archives: