This paper presents the last results on confinement studies in the TJ-II stellarator. The research of the dependence of spatially resolved transport coefficients on plasma parameters for ECH plasmas with Boronised wall shows that the heat confinement increases linearly with density while particle confinement increases sharply a factor four above a certain density threshold associated with the positive electric field. Remarkably, lowest order magnetic resonances, even in a low shear environment, reduce locally the effective diffusivities. The inherently strong plasma wall interaction of TJ-II has been successfully reduced after Lithium coating by vacuum evaporation. Besides H-retention and low Z, Li was chosen because there exists a reactor-oriented interest in this element, thus giving especial interest to the investigation of its properties. The Li-coating has led to important changes in plasma performance. Particularly, the effective density limit in NBI plasmas has been extended reaching central values of 8 x 10 19 m-3 and Te≈250-300 eV, with peaked density, rather flat Te profiles and increased ion temperatures. Alfvén modes are destabilised and their influence on fast ion confinement is studied in NBI discharges. Due to the achieved density control, a second type of transitions has been added to the low density ones previously observed in boronised wall. The high density transitions, under NBI with Li-coated walls are characterised by the fall of Hα emission, the onset of steep density gradient, and the reduction of the turbulence, which are characteristics of transition to H mode. TJ-II is therefore a unique device where first and second order phase transitions can be investigated.